| # Copyright 2021 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: |
| ##################################################################### |
| # Per-component CPU % each minute |
| # |
| # Once per minute, a syscall is made in appmgr (for v1 components) and |
| # component_manager (for v2 components) to fetch each component's CPU usage. |
| # This is multiplied by 100 and divided by number of cores to calculate |
| # a number 0-100. A ceiling function is used so that 0 means no CPU at all, |
| # 1 means (0..1]%, ... 100 means (99..100]%. |
| # |
| # The percentage number [0..100] increments the appropriate bucket of an |
| # Inspect occurence-count histogram for each component. |
| # |
| # Every 5 minutes, Sampler sends a delta of the component CPU % occurrence |
| # histograms to Cobalt for hourly summation and reporting. This data is |
| # currently being reported for most 1p components (after a privacy review). |
| # New components may be added in the future, after a privacy review. |
| # |
| # This metric does not distinguish between "big" and "little" cores. |
| ##################################################################### |
| - id: 1 |
| metric_name: per_component_cpu_percentage |
| metric_type: INTEGER_HISTOGRAM |
| metric_semantics: [CPU] |
| metric_dimensions: |
| - dimension: component |
| max_event_code: 100000 # Supports 100 config files, each with up to 1000 components |
| metric_units_other: "percentage" |
| int_buckets: |
| linear: |
| floor: 1 # 0 goes in the lower overflow bucket |
| num_buckets: 99 # 0% - 100% 100 goes in the upper overflow bucket |
| step_size: 1 # 1% |
| reports: |
| - id: 1 |
| report_name: fleetwide_histogram |
| report_type: FLEETWIDE_HISTOGRAMS |
| event_vector_buffer_max: 500 |
| privacy_level: NO_ADDED_PRIVACY |
| privacy_mechanism: DE_IDENTIFICATION |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2024/11/01" |
| |
| ##################################################################### |
| # Per-component crashes |
| # |
| # When a component crashes, the "exceptions" program records that the |
| # crash has happened. Each occurrence of a crash is reported. |
| # |
| # Every 5 minutes, Sampler sends a delta of the crash counts |
| # to Cobalt for components with non-zero crashes. This data will be |
| # reported only for components that opt into component_metrics collection. |
| ##################################################################### |
| - id: 2 |
| metric_name: per_component_crashes |
| metric_type: OCCURRENCE |
| metric_semantics: [USAGE_COUNTING] |
| metric_dimensions: |
| - dimension: component |
| max_event_code: 100000 # Supports 100 config files, each with up to 1000 components |
| reports: |
| - id: 1 |
| report_name: fleetwide_crashes |
| report_type: HOURLY_VALUE_NUMERIC_STATS |
| event_vector_buffer_max: 500 |
| privacy_level: NO_ADDED_PRIVACY |
| privacy_mechanism: DE_IDENTIFICATION |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2024/11/01" |
| |
| deleted_metric_ids: [3,4] |