Liking cljdoc? Tell your friends :D

clj-async-profiler.core


async-profiler-agent-pathclj


attach-agentclj

(attach-agent pid command-string)

flamegraph-script-pathclj


generate-flamegraphclj

(generate-flamegraph stacks-file options)

Generate a flamegraph SVG file from a collapsed stacks file, produced by async-profiler. For available options, see stop.

Generate a flamegraph SVG file from a collapsed stacks file, produced by
async-profiler. For available options, see `stop`.
raw docstring

get-self-pidclj

(get-self-pid)

Returns the process ID of the current JVM process.

Returns the process ID of the current JVM process.
raw docstring

list-event-typesclj

(list-event-types)
(list-event-types options)

Print all event types that can be sampled by the profiler. Available options:

:pid - process to attach to (default: current process)

Print all event types that can be sampled by the profiler. Available options:

:pid - process to attach to (default: current process)
raw docstring

profilecljmacro

(profile options? & body)

Profile the execution of body. If the first argument is a map, treat it as options. For available options, see start and stop. :pid option is ignored, current process is always profiled. Additional options:

:return-file - if true, return the generated flamegraph file, otherwise return the value returned by body (default: false - return value)

Profile the execution of `body`. If the first argument is a map, treat it as
options. For available options, see `start` and `stop`. `:pid` option is
ignored, current process is always profiled. Additional options:

:return-file - if true, return the generated flamegraph file, otherwise return
               the value returned by `body` (default: false - return value)
raw docstring

profile-forclj

(profile-for duration-in-seconds)
(profile-for duration-in-seconds options)

Run the profiler for the specified duration. Return the generated flamegraph file. For available options, see start and stop.

Run the profiler for the specified duration. Return the generated flamegraph
file. For available options, see `start` and `stop`.
raw docstring

run-flamegraph-scriptclj

(run-flamegraph-script in-stacks-file
                       out-svg-file
                       {:keys [min-width reverse? icicle?]
                        :or {icicle? reverse?}})

Run Flamegraph script on the provided stacks file, rendering the SVG result.

Run Flamegraph script on the provided stacks file, rendering the SVG result.
raw docstring

serve-filesclj

(serve-files port)

Start a simple webserver of the results directory on the provided port.

Start a simple webserver of the results directory on the provided port.
raw docstring

startclj

(start)
(start options)

Start the profiler. Available options:

:pid - process to attach to (default: current process) :interval - sampling interval in nanoseconds (default: 1000000 - 1ms) :threads - profile each thread separately :event - event to profile, see list-event-types (default: :cpu)

Start the profiler. Available options:

:pid - process to attach to (default: current process)
:interval - sampling interval in nanoseconds (default: 1000000 - 1ms)
:threads - profile each thread separately
:event - event to profile, see `list-event-types` (default: :cpu)
raw docstring

statusclj

(status)
(status options)

Get profiling agent status. Available options:

:pid - process to attach to (default: current process)

Get profiling agent status. Available options:

:pid - process to attach to (default: current process)
raw docstring

stopclj

(stop)
(stop options)

Stop the currently runnning profiler and and save the results into a temporary file. Return the file object with the results. Available options:

:pid - process to attach to (default: current process) :generate-flamegraph? - if true, generate flamegraph in the same directory as the profile (default: true) :min-width - minimum width in pixels for a frame to be shown on a flamegraph. Use this if the resulting flamegraph is too big and hangs your browser (default: nil, recommended: 1-5) :reverse? - if true, generate the reverse flamegraph which grows from callees up to callers (default: false) :icicle? - if true, invert the flamegraph upside down (default: false for regular flamegraph, true for reverse)

Stop the currently runnning profiler and and save the results into a temporary
file. Return the file object with the results. Available options:

:pid - process to attach to (default: current process)
:generate-flamegraph? - if true, generate flamegraph in the same directory as
                        the profile (default: true)
:min-width - minimum width in pixels for a frame to be shown on a flamegraph.
             Use this if the resulting flamegraph is too big and hangs your
             browser (default: nil, recommended: 1-5)
:reverse? - if true, generate the reverse flamegraph which grows from callees
            up to callers (default: false)
:icicle? - if true, invert the flamegraph upside down (default: false for
           regular flamegraph, true for reverse)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close