(clear-results)
Clear all results from /tmp/clj-async-profiler directory.
Clear all results from /tmp/clj-async-profiler directory.
(generate-diffgraph profile-before profile-after options)
Generate a diff flamegraph from two profiles, identified either by their file paths or IDs. Options:
:title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.:
... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
Generate a diff flamegraph from two profiles, identified either by their file paths or IDs. Options: :title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.: ... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
(generate-flamegraph run-id-or-stacks-file options)
Generate flamegraph from a collapsed stacks file, identified either by its file path or numerical ID. Options:
:title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.:
... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
Generate flamegraph from a collapsed stacks file, identified either by its file path or numerical ID. Options: :title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.: ... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
(list-event-types)
(list-event-types options)
Print all event types that can be sampled by the profiler. 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. Options: :pid - process to attach to (default: current process) :silent? - if true, only return the event types, don't print them.
(print-jvm-opt-for-startup-profiling options)
Generate a JVM option string that can be used to profile a JVM application completely from its start to finish. Prints further instructions to stdout. Options:
:event - event to profile, see list-event-types
(default: :cpu)
:interval - sampling interval in nanoseconds (default: 1000000 - 1ms)
:threads - profile each thread separately
:features - a list of extra features (or :all
to enable all). Features:
:vtable - show targets of vtable/itable calls
:comptask - show JIT compilation task
:framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
Generate a JVM option string that can be used to profile a JVM application completely from its start to finish. Prints further instructions to stdout. Options: :event - event to profile, see `list-event-types` (default: :cpu) :interval - sampling interval in nanoseconds (default: 1000000 - 1ms) :threads - profile each thread separately :features - a list of extra features (or `:all` to enable all). Features: :vtable - show targets of vtable/itable calls :comptask - show JIT compilation task :framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
(profile options? & body)
Profile the execution of body
. If the first argument is a map, treat it as
options. Options:
:event - event to profile, see list-event-types
(default: :cpu)
:interval - sampling interval in nanoseconds (default: 1000000 - 1ms)
:threads - profile each thread separately
:features - a list of extra features (or :all
to enable all). Features:
:vtable - show targets of vtable/itable calls
:comptask - show JIT compilation task
:framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
:title - title of the generated flamegraph (optional)
:config - a map to preconfigure the flamegraph. E.g.:
... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
Profile the execution of `body`. If the first argument is a map, treat it as options. Options: :event - event to profile, see `list-event-types` (default: :cpu) :interval - sampling interval in nanoseconds (default: 1000000 - 1ms) :threads - profile each thread separately :features - a list of extra features (or `:all` to enable all). Features: :vtable - show targets of vtable/itable calls :comptask - show JIT compilation task :framebuf - size of the buffer for stack frames (default: 1000000 - 1MB) :title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.: ... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
(profile-for duration-in-seconds)
(profile-for duration-in-seconds options)
Run the profiler for the specified duration. Return the generated flamegraph file. Options:
:pid - process to attach to (default: current process)
:event - event to profile, see list-event-types
(default: :cpu)
:interval - sampling interval in nanoseconds (default: 1000000 - 1ms)
:threads - profile each thread separately
:features - a list of extra features (or :all
to enable all). Features:
:vtable - show targets of vtable/itable calls
:comptask - show JIT compilation task
:framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
:title - title of the generated flamegraph (optional)
:config - a map to preconfigure the flamegraph. E.g.:
... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
Run the profiler for the specified duration. Return the generated flamegraph file. Options: :pid - process to attach to (default: current process) :event - event to profile, see `list-event-types` (default: :cpu) :interval - sampling interval in nanoseconds (default: 1000000 - 1ms) :threads - profile each thread separately :features - a list of extra features (or `:all` to enable all). Features: :vtable - show targets of vtable/itable calls :comptask - show JIT compilation task :framebuf - size of the buffer for stack frames (default: 1000000 - 1MB) :title - title of the generated flamegraph (optional) :config - a map to preconfigure the flamegraph. E.g.: ... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
(serve-ui port)
(serve-ui host port)
Start profiler web UI on the given host
(default: localhost) and port
.
Start profiler web UI on the given `host` (default: localhost) and `port`.
(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.
(start)
(start options)
Start the profiler. Options:
:pid - process to attach to (default: current process)
:event - event to profile, see list-event-types
(default: :cpu)
:interval - sampling interval in nanoseconds (default: 1000000 - 1ms)
:threads - profile each thread separately
:features - a list of extra features (or :all
to enable all). Features:
:vtable - show targets of vtable/itable calls
:comptask - show JIT compilation task
:framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
Start the profiler. Options: :pid - process to attach to (default: current process) :event - event to profile, see `list-event-types` (default: :cpu) :interval - sampling interval in nanoseconds (default: 1000000 - 1ms) :threads - profile each thread separately :features - a list of extra features (or `:all` to enable all). Features: :vtable - show targets of vtable/itable calls :comptask - show JIT compilation task :framebuf - size of the buffer for stack frames (default: 1000000 - 1MB)
(status)
(status options)
Get profiling agent status. Options:
:pid - process to attach to (default: current process)
Get profiling agent status. Options: :pid - process to attach to (default: current process)
(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) :config - a map to preconfigure the flamegraph. E.g.:
... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
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) :config - a map to preconfigure the flamegraph. E.g.: ... :config {:transforms [{:type :remove :what "frame_buffer_overflow"} {:type :replace :what #"(;manifold.deferred[^;]+)+" :replacement ";manifold.deferred/..."}] :highlight "Reflector" :reverse true :sort-by :name} ...
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close