wr_glyph_rasterizer/
telemetry.rs1#[cfg(feature = "gecko")]
6use glean::TimerId;
7#[cfg(feature = "gecko")]
8use firefox_on_glean::metrics::wr;
9
10#[cfg(not(feature = "gecko"))]
11pub struct TimerId;
12
13pub struct Telemetry;
14
15#[cfg(not(feature = "gecko"))]
17impl Telemetry {
18 pub fn start_rasterize_glyphs_time() -> TimerId { return TimerId {}; }
20 pub fn stop_and_accumulate_rasterize_glyphs_time(_id: TimerId) { }
22}
23
24#[cfg(feature = "gecko")]
25impl Telemetry {
26 pub fn start_rasterize_glyphs_time() -> TimerId { wr::rasterize_glyphs_time.start() }
27 pub fn stop_and_accumulate_rasterize_glyphs_time(id: TimerId) { wr::rasterize_glyphs_time.stop_and_accumulate(id); }
28}