Liking cljdoc? Tell your friends :D

clj-memory-meter.core


convert-to-human-readableclj

(convert-to-human-readable bytes)
Taken from http://programming.guide/java/formatting-byte-size-to-human-readable-format.html.
sourceraw docstring

measureclj

(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
sourceraw docstring

measure-listclj

(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
sourceraw docstring

measure-mapclj

(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
sourceraw docstring

measure-transposed-mapsclj

(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
sourceraw docstring

meter-builderclj

(meter-builder)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close