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