1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/// Reference frame interval in milliseconds for a 144 Hz display (`1000.0 / 144.0 ~= 6.94 ms`).
pub const TARGET_FRAME_INTERVAL_144HZ_MS: f64 = 1_000.0 / 144.0;
/// Reference frame interval in milliseconds for a 60 Hz display (`1000.0 / 60.0 ~= 16.67 ms`).
pub const TARGET_FRAME_INTERVAL_60HZ_MS: f64 = 1_000.0 / 60.0;
/// Reference frame interval in milliseconds for a 120 Hz display (`1000.0 / 120.0 ~= 8.33 ms`).
pub const TARGET_FRAME_INTERVAL_120HZ_MS: f64 = 1_000.0 / 120.0;
/// Reference frame interval in milliseconds for a 240 Hz display (`1000.0 / 240.0 ~= 4.17 ms`).
pub const TARGET_FRAME_INTERVAL_240HZ_MS: f64 = 1_000.0 / 240.0;
/// Default unobservable reason when a metric was not collected by the active platform backend.
pub const UNOBSERVABLE_NOT_COLLECTED: &str = "metric not collected by active platform backend";
/// Unobservable reason when hardware compositor presentation timestamps are unavailable.
pub const UNOBSERVABLE_NO_COMPOSITOR_TIMING: &str =
"host compositor presentation timing unavailable";
/// Unobservable reason when GPU execution timestamps are unavailable in-process.
pub const UNOBSERVABLE_NO_GPU_TIMING: &str = "gpu timestamp queries unavailable on active backend";
/// Unobservable reason when end-to-end input-to-present timestamp correlation is unavailable.
pub const UNOBSERVABLE_NO_INPUT_CORRELATION: &str =
"input-to-present timestamp correlation unavailable";
/// Unobservable reason when OS refresh-rate throttling telemetry is unavailable.
pub const UNOBSERVABLE_NO_OS_THROTTLE_SIGNAL: &str = "os refresh-rate throttle state unavailable";
/// Unobservable reason when CPU raster timing was not instrumented for the frame.
pub const UNOBSERVABLE_NO_CPU_RASTER_TIMING: &str = "cpu raster duration not instrumented";
/// Unobservable reason when executing on a terminal/CLI pipeline that does not use screen refresh Hz.
pub const UNOBSERVABLE_TERMINAL_NON_HZ: &str =
"terminal pipeline uses cell-diff/write metrics instead of screen Hz";
/// Unobservable reason when running inside an OS simulator without hardware compositor scanout timing.
pub const UNOBSERVABLE_SIMULATOR_NO_COMPOSITOR: &str =
"simulator target does not expose hardware compositor presentedTime";
pub const METRIC_STATUS_MEASURED: &str = "measured";
pub const METRIC_STATUS_PROXY: &str = "proxy";
pub const METRIC_STATUS_UNOBSERVABLE: &str = "unobservable";
pub const METRIC_FIELD_STATUS: &str = "status";
pub const METRIC_FIELD_VALUE: &str = "value";
pub const METRIC_FIELD_REASON: &str = "reason";
pub const METRIC_STRUCT_NAME: &str = "ObservableMetric";
pub const TIMING_SOURCE_COMPOSITOR: &str = "compositor_measured";
pub const TIMING_SOURCE_PROXY: &str = "submission_proxy";
pub const TIMING_SOURCE_UNOBSERVABLE: &str = "unobservable";
pub const UPLOAD_STRATEGY_DIRECT_GPU: &str = "direct_gpu";
pub const UPLOAD_STRATEGY_MULTI_RECT: &str = "multi_rect";
pub const UPLOAD_STRATEGY_MERGED_BBOX: &str = "merged_bbox";
pub const UPLOAD_STRATEGY_FULL_FRAME: &str = "full_frame";
pub const UPLOAD_STRATEGY_NONE: &str = "none";
pub const SURFACE_OUTCOME_SUBMITTED: &str = "submitted";
pub const SURFACE_OUTCOME_SKIPPED: &str = "skipped_unchanged";
pub const SURFACE_OUTCOME_FAILED: &str = "failed";