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  StarnixKernel = 77,
154  StarnixContainer = 78,
155  StarnixRunner = 79,
156}
157
158impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionBucket {
159  fn as_event_code(&self) -> u32 {
160    *self as u32
161  }
162}
163// Alias for memory_migrated (Metric Dimension bucket) which has the same event codes
164pub use MemoryMetricDimensionBucket as MemoryMigratedMetricDimensionBucket;
165
166// Enum for memory (Metric Dimension general_breakdown)
167#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
168pub enum MemoryMetricDimensionGeneralBreakdown {
169  TotalBytes = 0,
170  UsedBytes = 1,
171  FreeBytes = 2,
172  VmoBytes = 3,
173  KernelFreeHeapBytes = 4,
174  MmuBytes = 5,
175  IpcBytes = 6,
176  KernelTotalHeapBytes = 7,
177  WiredBytes = 8,
178  OtherBytes = 9,
179}
180
181impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionGeneralBreakdown {
182  fn as_event_code(&self) -> u32 {
183    *self as u32
184  }
185}
186// Alias for memory_general_breakdown_migrated (Metric Dimension general_breakdown) which has the same event codes
187pub use MemoryMetricDimensionGeneralBreakdown as MemoryGeneralBreakdownMigratedMetricDimensionGeneralBreakdown;
188
189// Alias for memory_leak_migrated (Metric Dimension general_breakdown) which has the same event codes
190pub use MemoryMetricDimensionGeneralBreakdown as MemoryLeakMigratedMetricDimensionGeneralBreakdown;
191
192// Enum for memory (Metric Dimension time_since_boot)
193#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
194pub enum MemoryMetricDimensionTimeSinceBoot {
195  Up = 0,
196  UpOneMinute = 1,
197  UpThirtyMinutes = 2,
198  UpOneHour = 3,
199  UpSixHours = 4,
200  UpTwelveHours = 5,
201  UpOneDay = 6,
202  UpTwoDays = 7,
203  UpThreeDays = 8,
204  UpSixDays = 9,
205}
206
207impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionTimeSinceBoot {
208  fn as_event_code(&self) -> u32 {
209    *self as u32
210  }
211}
212// Alias for memory_leak_migrated (Metric Dimension time_since_boot) which has the same event codes
213pub use MemoryMetricDimensionTimeSinceBoot as MemoryLeakMigratedMetricDimensionTimeSinceBoot;
214
215// Enum for memory (Metric Dimension allocator)
216#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
217pub enum MemoryMetricDimensionAllocator {
218  Ram = 0,
219  ContiguousRam = 1,
220  AmlogicSecure = 2,
221  AmlogicSecureVdec = 3,
222  GoldfishDeviceLocal = 4,
223  GoldfishHostVisible = 5,
224}
225
226impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionAllocator {
227  fn as_event_code(&self) -> u32 {
228    *self as u32
229  }
230}
231// Alias for memory_free_high_water_migrated (Metric Dimension allocator) which has the same event codes
232pub use MemoryMetricDimensionAllocator as MemoryFreeHighWaterMigratedMetricDimensionAllocator;
233
234// Alias for memory_usage_migrated (Metric Dimension allocator) which has the same event codes
235pub use MemoryMetricDimensionAllocator as MemoryUsageMigratedMetricDimensionAllocator;
236
237// Enum for memory (Metric Dimension stall_type)
238#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
239pub enum MemoryMetricDimensionStallType {
240  Full = 1,
241  Some = 2,
242}
243
244impl cobalt_client::traits::AsEventCode for MemoryMetricDimensionStallType {
245  fn as_event_code(&self) -> u32 {
246    *self as u32
247  }
248}
249// Alias for memory_stalls_per_hour (Metric Dimension stall_type) which has the same event codes
250pub use MemoryMetricDimensionStallType as MemoryStallsPerHourMetricDimensionStallType;
251
252#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
253pub struct MemoryLeakMigratedEventCodes {
254  pub general_breakdown: MemoryLeakMigratedMetricDimensionGeneralBreakdown,
255  pub time_since_boot: MemoryLeakMigratedMetricDimensionTimeSinceBoot,
256}
257
258impl cobalt_client::traits::AsEventCodes for MemoryLeakMigratedEventCodes {
259  fn as_event_codes(&self) -> Vec<u32> {
260    use cobalt_client::traits::AsEventCode;
261    vec![
262      self.general_breakdown.as_event_code(),
263      self.time_since_boot.as_event_code(),
264    ]
265  }
266}
267
268}