component_framework_cache_metrics_registry/
component_framework_cache_metrics_registry.rs

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
// This file was generated by Cobalt's Registry parser based on the registry YAML
// in the cobalt_config repository. Edit the YAML there to make changes.
pub const CUSTOMER_NAME: &str = "fuchsia";
pub const CUSTOMER_ID: u32 = 1;
pub const PROJECT_NAME: &str = "component_framework";
pub const PROJECT_ID: u32 = 21;

// Exponential bucket constants for cache_eviction cache_evictions_unique_devices_1_day
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_FLOOR: i64 = 0;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_1_DAY_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for cache_eviction cache_evictions_unique_devices_30_days
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_FLOOR: i64 = 0;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_INITIAL_STEP: u32 = 1;
pub const CACHE_EVICTION_CACHE_EVICTIONS_UNIQUE_DEVICES_30_DAYS_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Metric ID Constants
// cache_eviction
pub const CACHE_EVICTION_METRIC_ID: u32 = 1;

// Enum for component_framework (Metric Dimension result)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum ComponentFrameworkMetricDimensionResult {
  Unused = 0,
  Success = 1,
  FailedChannelClosed = 2,
  SuccessWithCaveats = 3,
}

impl cobalt_client::traits::AsEventCode for ComponentFrameworkMetricDimensionResult {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for cache_eviction (Metric Dimension result) which has the same event codes
pub use ComponentFrameworkMetricDimensionResult as CacheEvictionMetricDimensionResult;