| # 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-task 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 will be |
| # reported only for components that opt into component_metrics collection. |
| # |
| # 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 |
| system_profile_field: [BOARD_NAME, PRODUCT_NAME, ARCH, SYSTEM_VERSION, OS, CHANNEL, REALM] |
| meta_data: |
| max_release_stage: GA |
| expiration_date: "2022/08/01" |