Liking cljdoc? Tell your friends :D

clj-async-profiler.core


async-profiler-agent-pathclj

source

attach-agentclj

(attach-agent pid command-string)
source

clear-resultsclj

(clear-results)

Clear all results from /tmp/clj-async-profiler directory.

Clear all results from /tmp/clj-async-profiler directory.
sourceraw docstring

find-profileclj

(find-profile run-id-or-stacks-file)
source

generate-diffgraphclj

(generate-diffgraph profile-before profile-after options)

Generate a diff flamegraph SVG file from two profiles, identified by their IDs or filenames. For rendering-related options, see stop.

Generate a diff flamegraph SVG file from two profiles, identified by their IDs
or filenames. For rendering-related options, see `stop`.
sourceraw docstring

generate-flamegraphclj

(generate-flamegraph run-id-or-stacks-file options)

Generate a flamegraph HTML file from a collapsed stacks file, identified either by its filename, or numerical ID. For available options, see stop.

Generate a flamegraph HTML file from a collapsed stacks file, identified either
by its filename, or numerical ID. For available options, see `stop`.
sourceraw 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.
sourceraw 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) :silent? - if true, only return the event types, don't print them.

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

:pid - process to attach to (default: current process)
:silent? - if true, only return the event types, don't print them.
sourceraw 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)
sourceraw 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`.
sourceraw 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.
sourceraw docstring

set-default-profiling-optionsclj

(set-default-profiling-options default-options-map)

Set the map of default options that will be used for all subsequent profiling runs. Defaults will be merged with explicit options with lower priority.

Set the map of default options that will be used for all subsequent profiling
runs. Defaults will be merged with explicit options with lower priority.
sourceraw 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) :framebuf - size of the buffer for stack frames (default: 1000000 - 1MB) :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)
:framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
:threads - profile each thread separately
:event - event to profile, see `list-event-types` (default: :cpu)
sourceraw 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)
sourceraw docstring

stopclj

(stop)
(stop options)

Stop the currently running profiler and save the results into a text file. If flamegraph is generated next, the flamegraph file will be returned, otherwise the text file is returned. 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) :title - title of the generated flamegraph (optional) :predefined-transforms - a list of maps that specify the dynamic transforms to bake into the flamegraph. For example:

... :predefined-transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."} ...

Stop the currently running profiler and save the results into a text file.
If flamegraph is generated next, the flamegraph file will be returned,
otherwise the text file is returned. 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)
:title - title of the generated flamegraph (optional)
:predefined-transforms - a list of maps that specify the dynamic transforms to
                         bake into the flamegraph. For example:

...
:predefined-transforms [{:type :remove
                         :what "frame_buffer_overflow"}
                        {:type :replace
                         :what #"(;manifold.deferred[^;]+)+"
                         :replacement ";manifold.deferred/..."}
...
sourceraw docstring

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

× close