memory_metrics_registry/
memory_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 mod cobalt_registry {
4pub const CUSTOMER_NAME: &str = "fuchsia";
5pub const CUSTOMER_ID: u32 = 1;
6pub const PROJECT_NAME: &str = "memory";
7pub const PROJECT_ID: u32 = 3509424520;
8
9// Linear bucket constants for memory_migrated memory_bucket_histograms
10pub const MEMORY_MIGRATED_MEMORY_BUCKET_HISTOGRAMS_INT_BUCKETS_FLOOR: i64 = 0;
11pub const MEMORY_MIGRATED_MEMORY_BUCKET_HISTOGRAMS_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
12pub const MEMORY_MIGRATED_MEMORY_BUCKET_HISTOGRAMS_INT_BUCKETS_STEP_SIZE: u32 = 10485760;
13
14// Linear bucket constants for memory_leak_migrated histogram
15pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
16pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 205;
17pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 10485760;
18
19// Linear bucket constants for memory_leak_migrated histogram_per_device_max
20pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
21pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 205;
22pub const MEMORY_LEAK_MIGRATED_HISTOGRAM_PER_DEVICE_MAX_INT_BUCKETS_STEP_SIZE: u32 = 10485760;
23
24// Exponential bucket constants for memory_free_high_water_migrated free_min_histogram
25pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
26pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 32;
27pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 4096;
28pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
29
30// Exponential bucket constants for memory_free_high_water_migrated free_min_histogram_per_device
31pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_PER_DEVICE_INT_BUCKETS_FLOOR: i64 = 0;
32pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_PER_DEVICE_INT_BUCKETS_NUM_BUCKETS: u32 = 32;
33pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_PER_DEVICE_INT_BUCKETS_INITIAL_STEP: u32 = 4096;
34pub const MEMORY_FREE_HIGH_WATER_MIGRATED_FREE_MIN_HISTOGRAM_PER_DEVICE_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
35
36// Linear bucket constants for memory_usage_migrated memory_usage_histogram
37pub const MEMORY_USAGE_MIGRATED_MEMORY_USAGE_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
38pub const MEMORY_USAGE_MIGRATED_MEMORY_USAGE_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 205;
39pub const MEMORY_USAGE_MIGRATED_MEMORY_USAGE_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 10485760;
40
41// Linear bucket constants for memory_stalls_per_hour fleetwide_histogram_half_seconds
42pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_HALF_SECONDS_INT_BUCKETS_FLOOR: i64 = 0;
43pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_HALF_SECONDS_INT_BUCKETS_NUM_BUCKETS: u32 = 60;
44pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_HALF_SECONDS_INT_BUCKETS_STEP_SIZE: u32 = 500;
45
46// Linear bucket constants for memory_stalls_per_hour fleetwide_histogram_minutes
47pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_MINUTES_INT_BUCKETS_FLOOR: i64 = 0;
48pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_MINUTES_INT_BUCKETS_NUM_BUCKETS: u32 = 59;
49pub const MEMORY_STALLS_PER_HOUR_FLEETWIDE_HISTOGRAM_MINUTES_INT_BUCKETS_STEP_SIZE: u32 = 60000;
50
51// Metric ID Constants
52// memory_migrated
53pub const MEMORY_MIGRATED_METRIC_ID: u32 = 101;
54// memory_general_breakdown_migrated
55pub const MEMORY_GENERAL_BREAKDOWN_MIGRATED_METRIC_ID: u32 = 102;
56// memory_leak_migrated
57pub const MEMORY_LEAK_MIGRATED_METRIC_ID: u32 = 103;
58// memory_free_high_water_migrated
59pub const MEMORY_FREE_HIGH_WATER_MIGRATED_METRIC_ID: u32 = 104;
60// memory_usage_migrated
61pub const MEMORY_USAGE_MIGRATED_METRIC_ID: u32 = 105;
62// memory_stalls_per_hour
63pub const MEMORY_STALLS_PER_HOUR_METRIC_ID: u32 = 106;
64
65// Enum for memory (Metric Dimension bucket)
66#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
67pub enum MemoryMetricDimensionBucket {
68  TotalBytes = 0,
69  #[allow(non_camel_case_types)]
70  ZbiBuffer = 1,
71  Graphics = 2,
72  #[allow(non_camel_case_types)]
73  VideoBuffer = 3,
74  Minfs = 4,
75  Blobfs = 5,
76  Opal = 6,
77  Web = 7,
78  Kronk = 8,
79  Scenic = 9,
80  Amlogic = 10,
81  Netstack = 11,
82  Amber = 12,
83  Pkgfs = 13,
84  Cast = 14,
85  Chromium = 15,
86  Free = 16,
87  Kernel = 17,
88  Orphaned = 18,
89  Undigested = 19,
90  Flutter = 20,
91  Fshost = 21,
92  Archivist = 22,
93  Cobalt = 23,
94  Audio = 24,
95  Context = 25,
96  ContiguousPool = 26,
97  ProtectedPool = 27,
98  FlutterApps = 28,
99  BlobfsInactive = 29,
100  ContiguousPoolFree = 30,
101  ProtectedPoolFree = 31,
102  #[allow(non_camel_case_types)]
103  __Addl_PagerTotal = 32,
104  #[allow(non_camel_case_types)]
105  __Addl_PagerNewest = 33,
106  #[allow(non_camel_case_types)]
107  __Addl_PagerOldest = 34,
108  #[allow(non_camel_case_types)]
109  __Addl_DiscardableLocked = 35,
110  #[allow(non_camel_case_types)]
111  __Addl_DiscardableUnlocked = 36,
112  Perception = 37,
113  Camera = 38,
114  AppManager = 39,
115  ComponentManager = 40,
116  Comms = 41,
117  Resolvers = 42,
118  SoundPlayer = 43,
119  Ultrasound = 44,
120  Vision = 45,
121  Feedback = 46,
122  CompositeDrivers = 47,
123  OtherDrivers = 48,
124  Code49 = 49,
125  A11y = 50,
126  Bluetooth = 51,
127  Hci = 52,
128  I18N = 53,
129  SetUi = 54,
130  SoftwareDelivery = 55,
131  Thread = 56,
132  Weave = 57,
133  Wlan = 58,
134  NetworkPolicy = 59,
135  Code60 = 60,
136  Code61 = 61,
137  Code62 = 62,
138  DriverFramework = 63,
139  EngTools = 64,
140  Power = 65,
141  Code66 = 66,
142  Code67 = 67,
143  Fxfs = 68,
144  SceneManager = 69,
145  Gazelle = 70,
146  Netsvc = 71,
147  Storage = 72,
148  Fxblob = 73,
149  Code74 = 74,
150  Code75 = 75,
151  #[allow(non_camel_case_types)]
152  __Addl_ZramCompressedBytes = 76,
153}
154
155impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionBucket {
156  fn as_event_code(&self) -> u32 {
157    *self as u32
158  }
159}
160// Alias for memory_migrated (Metric Dimension bucket) which has the same event codes
161pub use MemoryMetricDimensionBucket as MemoryMigratedMetricDimensionBucket;
162
163// Enum for memory (Metric Dimension general_breakdown)
164#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
165pub enum MemoryMetricDimensionGeneralBreakdown {
166  TotalBytes = 0,
167  UsedBytes = 1,
168  FreeBytes = 2,
169  VmoBytes = 3,
170  KernelFreeHeapBytes = 4,
171  MmuBytes = 5,
172  IpcBytes = 6,
173  KernelTotalHeapBytes = 7,
174  WiredBytes = 8,
175  OtherBytes = 9,
176}
177
178impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionGeneralBreakdown {
179  fn as_event_code(&self) -> u32 {
180    *self as u32
181  }
182}
183// Alias for memory_general_breakdown_migrated (Metric Dimension general_breakdown) which has the same event codes
184pub use MemoryMetricDimensionGeneralBreakdown as MemoryGeneralBreakdownMigratedMetricDimensionGeneralBreakdown;
185
186// Alias for memory_leak_migrated (Metric Dimension general_breakdown) which has the same event codes
187pub use MemoryMetricDimensionGeneralBreakdown as MemoryLeakMigratedMetricDimensionGeneralBreakdown;
188
189// Enum for memory (Metric Dimension time_since_boot)
190#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
191pub enum MemoryMetricDimensionTimeSinceBoot {
192  Up = 0,
193  UpOneMinute = 1,
194  UpThirtyMinutes = 2,
195  UpOneHour = 3,
196  UpSixHours = 4,
197  UpTwelveHours = 5,
198  UpOneDay = 6,
199  UpTwoDays = 7,
200  UpThreeDays = 8,
201  UpSixDays = 9,
202}
203
204impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionTimeSinceBoot {
205  fn as_event_code(&self) -> u32 {
206    *self as u32
207  }
208}
209// Alias for memory_leak_migrated (Metric Dimension time_since_boot) which has the same event codes
210pub use MemoryMetricDimensionTimeSinceBoot as MemoryLeakMigratedMetricDimensionTimeSinceBoot;
211
212// Enum for memory (Metric Dimension allocator)
213#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
214pub enum MemoryMetricDimensionAllocator {
215  Ram = 0,
216  ContiguousRam = 1,
217  AmlogicSecure = 2,
218  AmlogicSecureVdec = 3,
219  GoldfishDeviceLocal = 4,
220  GoldfishHostVisible = 5,
221}
222
223impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionAllocator {
224  fn as_event_code(&self) -> u32 {
225    *self as u32
226  }
227}
228// Alias for memory_free_high_water_migrated (Metric Dimension allocator) which has the same event codes
229pub use MemoryMetricDimensionAllocator as MemoryFreeHighWaterMigratedMetricDimensionAllocator;
230
231// Alias for memory_usage_migrated (Metric Dimension allocator) which has the same event codes
232pub use MemoryMetricDimensionAllocator as MemoryUsageMigratedMetricDimensionAllocator;
233
234// Enum for memory (Metric Dimension stall_type)
235#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
236pub enum MemoryMetricDimensionStallType {
237  Full = 1,
238  Some = 2,
239}
240
241impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionStallType {
242  fn as_event_code(&self) -> u32 {
243    *self as u32
244  }
245}
246// Alias for memory_stalls_per_hour (Metric Dimension stall_type) which has the same event codes
247pub use MemoryMetricDimensionStallType as MemoryStallsPerHourMetricDimensionStallType;
248
249#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
250pub struct MemoryLeakMigratedEventCodes {
251  pub general_breakdown: MemoryLeakMigratedMetricDimensionGeneralBreakdown,
252  pub time_since_boot: MemoryLeakMigratedMetricDimensionTimeSinceBoot,
253}
254
255impl cobalt_client::traits::AsEventCodes for MemoryLeakMigratedEventCodes {
256  fn as_event_codes(&self) -> Vec<u32> {
257    use cobalt_client::traits::AsEventCode;
258    vec![
259      self.general_breakdown.as_event_code(),
260      self.time_since_boot.as_event_code(),
261    ]
262  }
263}
264
265}