MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / console_timer_end

Method console_timer_end

crates/core/src/host/instance_env.rs:326–331  ·  view source on GitHub ↗

End a console timer by logging the span at INFO level.

(&self, span: &TimingSpan, function: Option<&str>)

Source from the content-addressed store, hash-verified

324
325 /// End a console timer by logging the span at INFO level.
326 pub(crate) fn console_timer_end(&self, span: &TimingSpan, function: Option<&str>) {
327 let elapsed = span.start.elapsed();
328 let message = format!("Timing span {:?}: {:?}", &span.name, elapsed);
329
330 self.console_log_simple_message(LogLevel::Info, function, &message);
331 }
332
333 /// Returns the current time suitable for logging.
334 pub fn now_for_logging() -> DateTime<Utc> {

Callers

nothing calls this directly

Calls 2

elapsedMethod · 0.80

Tested by

no test coverage detected