Struct slog_perf::TimeReporter [] [src]

pub struct TimeReporter { /* fields omitted */ }

Collect and report total time spent on set of activities

TimeReporter is useful for generating and reporting time reports: how much time was spend on a given activity.

On drop or on call to finish it will report total times gathered to slog::Logger.

Methods

impl TimeReporter
[src]

[src]

Create new TimeReporter

[src]

Create new TimeReporter

[src]

Start counting time for a state named "key"

If this the TimeReporter was already counting time for another state, it will end counting time for it before starting new one.

[src]

Start counting time and execute a function f

This is handy syntax for if let or while let expressions where it would be inconvenient to add standalone start call.

[src]

[src]

Finish counting time and report results

Trait Implementations

impl Drop for TimeReporter
[src]

[src]

Executes the destructor for this type. Read more