MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / instance

Method instance

crates/instrument-hooks-bindings/src/mod.rs:28–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 /// Returns a singleton instance of `InstrumentHooks`.
27 #[inline(always)]
28 pub fn instance() -> &'static Self {
29 static INSTANCE: OnceLock<InstrumentHooks> = OnceLock::new();
30 INSTANCE.get_or_init(|| {
31 let instance =
32 InstrumentHooks::new().expect("Failed to initialize InstrumentHooks");
33 instance
34 .set_integration("codspeed-rust", env!("CARGO_PKG_VERSION"))
35 .expect("Failed to set integration");
36 instance
37 })
38 }
39
40 #[inline(always)]
41 pub fn is_instrumented(&self) -> bool {

Callers

nothing calls this directly

Calls 1

set_integrationMethod · 0.45

Tested by

no test coverage detected