EventTracker.jl

See Gallery for examples.

Recording API

Recording API is defined in EventTrackerBase.jl and re-exported from EventTracker.jl.

EventTrackerBase.@recordintervalMacro
@recordinterval tag code
@recordinterval code

Record the start and stop times for executing code.

tag must be a literal symbol; i.e., @recordinterval :my_tag ... instead of @recordinterval my_tag ....

Examples

julia> using EventTrackerBase

julia> @recordinterval begin
           sleep(0.01)
           1
       end
1

The timing can now be printed with using EventTracker then EventTracker.summary().

source
EventTrackerBase.clearFunction
EventTracker.clear()

Clear all records. The caller must ensure that no recordings are happening concurrently.

source

Analysis API

EventTracker.summary_dataframeFunction
EventTracker.summary_dataframe(; owntime = false)

Compute the summary of the events.

It computes the summary statistics of the events for each location and join the location information.

source
EventTracker.event_dataframeFunction
EventTracker.event_dataframe(; owntime = false)

Export tracked events as a DataFrame. If owntime = true is passed, include owntime column by analyzing the nesting of the intervals and compute the during excluding the time spent in the sub-intervals.

source
EventTracker.stacksFunction
EventTracker.stacks()

Analyze nestings of the recorded intervals to recover the "call trees" of the functions instrumented with @recordinterval macro.

Currently, the returned object only supports Plots.plot API.

source