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