Skip to main content

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