Struct hprof::Profiler [] [src]

pub struct Profiler { /* fields omitted */ }

A single tree of profile data.

Methods

impl Profiler
[src]

Create a new profiler with the given name for the root node.

Enter a profile node for name, returning a guard object that will leave on destruction.

Enter a profile node for name.

Leave the current profile node.

Print out the current timing information in a very naive way.

Return the root profile node for inspection.

This root will always be valid and reflect the current state of the Profiler. It is not advised to inspect the data between calls to start_frame and end_frame.

Finish a frame.

Logs an error if there are pending leave calls, and later attempts to print timing data will be met with sadness in the form of NaNs.

Start a frame.

Resets timing data. Logs an error if there are pending leave calls, but there are otherwise no ill effects.

Disable the profiler.

All calls until enable will do nothing.

Enable the profiler.

Calls will take effect until disable is called.

Toggle the profiler enabledness.