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