pub fn note_time(task: &str, key: &str)Expand description
Adds the current time as a value for a key in the last event of a task.
This function records the current timestamp relative to the profiler’s genesis time and adds it as a note to the task.
§Arguments
task- The string identifier of the task to annotatekey- The key under which to store the timestamp
§Panics
- Panics if the last event was not started
§Examples
use altius_benchtools::profiler;
profiler::start("long_operation");
// ... initial setup ...
profiler::note_time("long_operation", "setup_complete");
// ... main work ...
profiler::note_time("long_operation", "work_complete");
// ... cleanup ...
profiler::end("long_operation");