()
| 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 { |
nothing calls this directly
no test coverage detected