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