component_framework_cache_metrics_registry/
component_framework_cache_metrics_registry.rs

1// This file was generated by Cobalt's Registry parser based on the registry YAML
2// in the cobalt_config repository. Edit the YAML there to make changes.
3pub const CUSTOMER_NAME: &str = "fuchsia";
4pub const CUSTOMER_ID: u32 = 1;
5pub const PROJECT_NAME: &str = "component_framework";
6pub const PROJECT_ID: u32 = 21;
7
8// Exponential bucket constants for cache_eviction cache_evictions_unique_devices_1_day
9pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_FLOOR: i64 = 0;
10pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
11pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_INITIAL_STEP: u32 = 1;
12pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
13
14// Exponential bucket constants for cache_eviction cache_evictions_unique_devices_30_days
15pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_FLOOR: i64 = 0;
16pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
17pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_INITIAL_STEP: u32 = 1;
18pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
19
20// Metric ID Constants
21// cache_eviction
22pub const CACHE_EVICTION_METRIC_ID: u32 = 1;
23
24// Enum for component_framework (Metric Dimension result)
25#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
26pub enum ComponentFrameworkMetricDimensionResult {
27  Unused = 0,
28  Success = 1,
29  FailedChannelClosed = 2,
30  SuccessWithCaveats = 3,
31}
32
33impl cobalt_client::traits::AsEventCode for ComponentFrameworkMetricDimensionResult {
34  fn as_event_code(&self) -> u32 {
35    *self as u32
36  }
37}
38// Alias for cache_eviction (Metric Dimension result) which has the same event codes
39pub use ComponentFrameworkMetricDimensionResult as CacheEvictionMetricDimensionResult;
40