(convert-to-human-readable bytes)Taken from http://programming.guide/java/formatting-byte-size-to-human-readable-format.html.
(measure object & {:keys [debug shallow bytes meter]})Measure the memory usage of the object. Return a human-readable string.
:debug - if true, print the object layout tree to stdout. Can also be set to a number to limit the nesting level being printed. :shallow - if true, count only the object header and its fields, don't follow object references :bytes - if true, return a number of bytes instead of a string :meter - custom org.github.jamm.MemoryMeter object
Measure the memory usage of the `object`. Return a human-readable string.
:debug - if true, print the object layout tree to stdout. Can also be set to
a number to limit the nesting level being printed.
:shallow - if true, count only the object header and its fields, don't follow
object references
:bytes - if true, return a number of bytes instead of a string
:meter - custom org.github.jamm.MemoryMeter object(measure-list lst & {:keys [bytes sort]})Measure each item in lst individually and return a list of maps that contain
the original value and its size in bytes. Note that if multiple items contain
references to a shared object, its size will be counted multiple times.
:bytes - if true, return a number of bytes instead of a string :sort - sort the items from larger to smaller
Measure each item in `lst` individually and return a list of maps that contain the original value and its size in bytes. Note that if multiple items contain references to a shared object, its size will be counted multiple times. :bytes - if true, return a number of bytes instead of a string :sort - sort the items from larger to smaller
(measure-map amap & {:keys [bytes]})Measure each value in amap individually and return a list of maps that
contain the original key and value and the value size in bytes. Note that if
multiple items contain references to a shared object, its size will be counted
multiple times.
:bytes - if true, return a number of bytes instead of a string
Measure each value in `amap` individually and return a list of maps that contain the original key and value and the value size in bytes. Note that if multiple items contain references to a shared object, its size will be counted multiple times. :bytes - if true, return a number of bytes instead of a string
(measure-transposed-maps list-of-maps & {:keys [bytes]})Given a list of maps, group all values in them by their key, and then measure each group separately. Note that if multiple items contain references to a shared object, its size will be counted multiple times.
:bytes - if true, return a number of bytes instead of a string
Given a list of maps, group all values in them by their key, and then measure each group separately. Note that if multiple items contain references to a shared object, its size will be counted multiple times. :bytes - if true, return a number of bytes instead of a string
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |