| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| metric_definitions: |
| |
| ##################################################################### |
| # fuchsia memory_usage with VMO owner breakdown |
| # |
| # Every five minutes, we log the current memory usage in bytes, divided into buckets: |
| ##################################################################### |
| - id: 1 |
| replacement_metric_id: 101 |
| metric_name: memory |
| metric_type: MEMORY_USAGE |
| metric_dimensions: &m_buckets |
| - dimension: bucket |
| event_codes: |
| 0: TotalBytes |
| 1: "ZBI Buffer" |
| 2: "Graphics" |
| 3: "Video Buffer" |
| 4: "Minfs" |
| 5: "Blobfs" |
| 6: "Opal" |
| 7: "Web" |
| 8: "Kronk" |
| 9: "Scenic" |
| 10: "Amlogic" |
| 11: "Netstack" |
| 12: "Amber" |
| 13: "Pkgfs" |
| 14: "Cast" |
| 15: "Chromium" |
| 16: "Free" |
| 17: "Kernel" |
| 18: "Orphaned" |
| 19: "Undigested" |
| 20: "Flutter" |
| 21: "Fshost" |
| 22: "Archivist" |
| 23: "Cobalt" |
| 24: "Audio" |
| 25: "Context" |
| 26: "ContiguousPool" |
| 27: "ProtectedPool" |
| 28: "FlutterApps" |
| 29: "BlobfsInactive" |
| 30: "ContiguousPoolFree" |
| 31: "ProtectedPoolFree" |
| 32: "[Addl]PagerTotal" |
| 33: "[Addl]PagerNewest" |
| 34: "[Addl]PagerOldest" |
| 35: "[Addl]DiscardableLocked" |
| 36: "[Addl]DiscardableUnlocked" |
| 37: "Perception" |
| 38: "Camera" |
| 39: "AppManager" |
| 40: "ComponentManager" |
| 41: "Comms" |
| 42: "Resolvers" |
| 43: "SoundPlayer" |
| 44: "Ultrasound" |
| 45: "Vision" |
| 46: "Feedback" |
| 47: "CompositeDrivers" |
| 48: "OtherDrivers" |
| 49: "Code49" |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| reports: |
| - report_name: memory_bucket_bytes |
| id: 418864817 # legacy long report_id |
| report_type: NUMERIC_AGGREGATION |
| percentiles: [5, 10, 90, 95, 99] |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: memory_bucket_histograms |
| id: 1374084281 # legacy long report_id |
| report_type: INT_RANGE_HISTOGRAM |
| int_buckets: &mbh_buckets |
| linear: |
| floor: 0 |
| num_buckets: 100 |
| step_size: 10485760 # 10 MiB |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: memory_bucket_per_device_max |
| id: 416922189 # legacy long report_id |
| report_type: PER_DEVICE_NUMERIC_STATS |
| aggregation_type: MAX |
| window_size: |
| - 1 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| |
| - id: 101 |
| metric_name: memory_migrated |
| metric_type: INTEGER |
| metric_semantics: [MEMORY_USAGE] |
| metric_units: BYTES |
| metric_dimensions: *m_buckets |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| reports: |
| - report_name: memory_bucket_bytes_per_hour_max |
| id: 1 |
| report_type: HOURLY_VALUE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: memory_bucket_histograms |
| id: 2 |
| report_type: FLEETWIDE_HISTOGRAMS |
| int_buckets: *mbh_buckets |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: memory_bucket_per_device_max |
| id: 3 |
| report_type: UNIQUE_DEVICE_NUMERIC_STATS |
| local_aggregation_period: WINDOW_1_DAY |
| local_aggregation_procedure: MAX_PROCEDURE |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| |
| ##################################################################### |
| # fuchsia memory usage with general breakdown |
| # |
| # Every five minutes, we log the current memory usage in bytes from kmem |
| # with the usage breakdown. |
| # TODO (fxb/22989): This is intended to be a copy of the fuchsia_memory_experimental |
| # metric in fuchsia_system_metrics project. The original one will be removed once |
| # this one get enough data to be shown on dashboard. |
| ##################################################################### |
| - id: 2 |
| replacement_metric_id: 102 |
| metric_name: memory_general_breakdown |
| metric_type: MEMORY_USAGE |
| metric_dimensions: &mgb_dimensions |
| - dimension: general_breakdown |
| event_codes: &general_breakdown_event_codes |
| 0: TotalBytes |
| 1: UsedBytes |
| 2: FreeBytes |
| 3: VmoBytes |
| 4: KernelFreeHeapBytes |
| 5: MmuBytes |
| 6: IpcBytes |
| 7: KernelTotalHeapBytes |
| 8: WiredBytes |
| 9: OtherBytes |
| reports: |
| ##################################################################### |
| # fuchsia_memory_usage |
| # |
| ##################################################################### |
| - report_name: numeric_aggr |
| id: 3919360026 # legacy long report_id |
| report_type: NUMERIC_AGGREGATION |
| percentiles: [5, 10, 90, 95, 99] |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: numeric_aggr_per_device_max |
| id: 1478375832 # legacy long report_id |
| report_type: PER_DEVICE_NUMERIC_STATS |
| aggregation_type: MAX |
| window_size: |
| - 1 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| |
| - id: 102 |
| metric_name: memory_general_breakdown_migrated |
| metric_type: INTEGER |
| metric_semantics: [MEMORY_USAGE] |
| metric_units: BYTES |
| metric_dimensions: *mgb_dimensions |
| reports: |
| ##################################################################### |
| # fuchsia_memory_usage |
| # |
| ##################################################################### |
| - report_name: numeric_aggr_per_hour_max |
| id: 1 |
| report_type: HOURLY_VALUE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: numeric_aggr_per_device_max |
| id: 2 |
| report_type: UNIQUE_DEVICE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| local_aggregation_period: WINDOW_1_DAY |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| |
| ##################################################################### |
| # fuchsia memory usage with general breakdown and time-since-boot breakdown |
| # |
| # Every five minutes, we log the current memory usage in bytes from kmem |
| # with the usage breakdown and time since boot breakdown, intended to detect |
| # memory leak over time. |
| # TODO (fxb/22989): This is intended to be a copy of the fuchsia_memory_experimental |
| # metric in fuchsia_system_metrics project. The original one will be removed once |
| # this one get enough data to be shown on dashboard. |
| ##################################################################### |
| - id: 3 |
| replacement_metric_id: 103 |
| metric_name: memory_leak |
| metric_type: MEMORY_USAGE |
| metric_dimensions: &ml_dimensions |
| - dimension: general_breakdown |
| event_codes: *general_breakdown_event_codes |
| - dimension: time_since_boot |
| event_codes: |
| 0: Up |
| 1: UpOneMinute |
| 2: UpThirtyMinutes |
| 3: UpOneHour |
| 4: UpSixHours |
| 5: UpTwelveHours |
| 6: UpOneDay |
| 7: UpTwoDays |
| 8: UpThreeDays |
| 9: UpSixDays |
| reports: |
| ##################################################################### |
| # fuchsia_memory_usage |
| ##################################################################### |
| - report_name: numeric_aggr |
| id: 3919360026 # legacy long report_id |
| report_type: NUMERIC_AGGREGATION |
| percentiles: [5, 10, 90, 95, 99] |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: histogram |
| id: 448373949 # legacy long report_id |
| report_type: INT_RANGE_HISTOGRAM |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| int_buckets: &ml_h_buckets |
| linear: &linear_buckets |
| floor: 0 |
| num_buckets: 205 # 2 GiB / 10 MiB |
| step_size: 10485760 # 10 MiB |
| - report_name: numeric_aggr_per_device_max |
| id: 1478375832 # legacy long report_id |
| report_type: PER_DEVICE_NUMERIC_STATS |
| aggregation_type: MAX |
| window_size: |
| - 1 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: histogram_per_device_max |
| id: 3009231037 # legacy long report_id |
| report_type: PER_DEVICE_HISTOGRAM |
| aggregation_type: MAX |
| window_size: |
| - 1 |
| int_buckets: |
| linear: *linear_buckets |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| |
| - id: 103 |
| metric_name: memory_leak_migrated |
| metric_type: INTEGER |
| metric_semantics: [MEMORY_USAGE] |
| metric_units: BYTES |
| metric_dimensions: *ml_dimensions |
| reports: |
| ##################################################################### |
| # fuchsia_memory_usage |
| ##################################################################### |
| - report_name: numeric_aggr_per_hour_max |
| id: 1 |
| report_type: HOURLY_VALUE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: histogram |
| id: 2 |
| report_type: FLEETWIDE_HISTOGRAMS |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| int_buckets: *ml_h_buckets |
| - report_name: numeric_aggr_per_device_max |
| id: 3 |
| report_type: UNIQUE_DEVICE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| local_aggregation_period: WINDOW_1_DAY |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| - report_name: histogram_per_device_max |
| id: 4 |
| report_type: UNIQUE_DEVICE_HISTOGRAMS |
| system_profile_selection: SELECT_LAST |
| local_aggregation_procedure: MAX_PROCEDURE |
| local_aggregation_period: WINDOW_1_DAY |
| int_buckets: |
| linear: *linear_buckets |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/01/07" |
| |
| ################################################################################ |
| # Sysmem free memory at memory high water |
| # |
| # The event reported by sysmem is the minimum amount of free memory in the |
| # allocator at any time since the system was booted. Updated by Lapis (using |
| # the sysmem inspect data) once every 5 minutes. |
| ################################################################################ |
| - id: 4 |
| replacement_metric_id: 104 |
| metric_name: memory_free_high_water |
| metric_type: EVENT_COUNT |
| metric_dimensions: &mfhw_dimensions |
| - dimension: allocator |
| event_codes: &allocator_event_codes |
| 0: Ram |
| 1: ContiguousRam |
| 2: AmlogicSecure |
| 3: AmlogicSecureVdec |
| 4: GoldfishDeviceLocal |
| 5: GoldfishHostVisible |
| reports: |
| # This report picks the minimum value for a device each week and generates |
| # summary statistics. This aggregation helps us ignore samples taken right |
| # after a device reboots so we can focus on how many devices ever use a |
| # particular amount of memory. |
| - report_name: free_min_per_device |
| id: 1 |
| report_type: PER_DEVICE_NUMERIC_STATS |
| aggregation_type: MIN |
| window_size: &sysmem_aggregation_window |
| # Seven days is a bit arbitrary, but for now we can assume the device |
| # will hit its maximum memory usage within that amount of time. |
| - 7 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # This report just gets the current value from all devices, which can be |
| # useful for determining how long it takes for devices to reach |
| # high-memory-usage states. |
| - report_name: free_min_histogram |
| id: 2 |
| report_type: INT_RANGE_HISTOGRAM |
| int_buckets: &fmh_buckets |
| exponential: &exponential_buckets |
| floor: 0 |
| num_buckets: 32 |
| initial_step: 4096 |
| step_multiplier: 2 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # Similar to report 1, but gives the whole histogram and not just summary |
| # statistics. |
| - report_name: free_min_histogram_per_device |
| id: 3 |
| report_type: PER_DEVICE_HISTOGRAM |
| aggregation_type: MIN |
| window_size: *sysmem_aggregation_window |
| int_buckets: &fmhpd_buckets |
| exponential: *exponential_buckets |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2021/12/17" |
| |
| - id: 104 |
| metric_name: memory_free_high_water_migrated |
| metric_type: INTEGER |
| metric_semantics: [MEMORY_USAGE] |
| metric_units: BYTES |
| metric_dimensions: *mfhw_dimensions |
| reports: |
| # This report picks the minimum value for a device each week and generates |
| # summary statistics. This aggregation helps us ignore samples taken right |
| # after a device reboots so we can focus on how many devices ever use a |
| # particular amount of memory. |
| - report_name: free_min_per_device |
| id: 1 |
| report_type: UNIQUE_DEVICE_NUMERIC_STATS |
| local_aggregation_procedure: MIN_PROCEDURE |
| # Seven days is a bit arbitrary, but for now we can assume the device |
| # will hit its maximum memory usage within that amount of time. |
| local_aggregation_period: WINDOW_7_DAYS |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # This report just gets the current value from all devices, which can be |
| # useful for determining how long it takes for devices to reach |
| # high-memory-usage states. |
| - report_name: free_min_histogram |
| id: 2 |
| report_type: FLEETWIDE_HISTOGRAMS |
| int_buckets: *fmh_buckets |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # Similar to report 1, but gives the whole histogram and not just summary |
| # statistics. |
| - report_name: free_min_histogram_per_device |
| id: 3 |
| report_type: UNIQUE_DEVICE_HISTOGRAMS |
| system_profile_selection: SELECT_LAST |
| aggregation_type: MIN |
| # Seven days is a bit arbitrary, but for now we can assume the device |
| # will hit its maximum memory usage within that amount of time. |
| local_aggregation_period: WINDOW_7_DAYS |
| local_aggregation_procedure: MIN_PROCEDURE |
| int_buckets: *fmhpd_buckets |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2021/12/17" |
| |
| ################################################################################ |
| # Sysmem Memory usage |
| # |
| # The current memory consumption from a sysmem allocator. Updated by Lapis |
| # (using the sysmem inspect data) once every 5 minutes. |
| ################################################################################ |
| - id: 5 |
| replacement_metric_id: 105 |
| metric_name: memory_usage |
| metric_type: EVENT_COUNT |
| metric_dimensions: &mu_dimensions |
| - dimension: allocator |
| event_codes: *allocator_event_codes |
| reports: |
| # This report gives the max memory usage on a device each week. This can |
| # miss transient spikes in memory usage. |
| - report_name: memory_usage_max_per_device |
| id: 1 |
| report_type: PER_DEVICE_NUMERIC_STATS |
| aggregation_type: MAX |
| window_size: *sysmem_aggregation_window |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # Raw histogram of the memory usage on a device. |
| - report_name: memory_usage_histogram |
| id: 2 |
| report_type: INT_RANGE_HISTOGRAM |
| int_buckets: &muh_buckets |
| linear: *linear_buckets |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2021/12/17" |
| |
| - id: 105 |
| metric_name: memory_usage_migrated |
| metric_type: INTEGER |
| metric_semantics: [MEMORY_USAGE] |
| metric_units: BYTES |
| metric_dimensions: *mu_dimensions |
| reports: |
| # This report gives the max memory usage on a device each week. This can |
| # miss transient spikes in memory usage. |
| - report_name: memory_usage_max_per_device |
| id: 1 |
| report_type: UNIQUE_DEVICE_NUMERIC_STATS |
| local_aggregation_procedure: MAX_PROCEDURE |
| # Seven days is a bit arbitrary, but for now we can assume the device |
| # will hit its maximum memory usage within that amount of time. |
| local_aggregation_period: WINDOW_7_DAYS |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| # Raw histogram of the memory usage on a device. |
| - report_name: memory_usage_histogram |
| id: 2 |
| report_type: FLEETWIDE_HISTOGRAMS |
| int_buckets: *muh_buckets |
| privacy_level: NO_ADDED_PRIVACY |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2021/12/17" |