[camera][cobalt] Add memory bandwidth metric
This change adds a new metric to collect and report the memory bandwidth
usages of the camera component.
Bug: b/194973501
Change-Id: Ia002f00459d7e49177b318d69e4e758477edb0d9
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt-registry/+/564041
Reviewed-by: Zach Bush <zmbush@google.com>
Privacy-Approval: Alexandre Zani <azani@google.com>
Fuchsia-Auto-Submit: Changyeon Jo <changyeon@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/fuchsia/camera/metrics.yaml b/fuchsia/camera/metrics.yaml
index cec4a92..93aa2df 100644
--- a/fuchsia/camera/metrics.yaml
+++ b/fuchsia/camera/metrics.yaml
@@ -161,3 +161,31 @@
meta_data:
max_release_stage: GA
expiration_date: "2022/05/18"
+
+- id: 5
+ metric_name: camera_stream_memory_bandwidth_in_kbytes
+ metric_type: INTEGER
+ metric_units: KILOBYTES
+ metric_semantics: [MEMORY_USAGE]
+
+ metric_dimensions:
+ - dimension: stream_type
+ event_codes: *stream_types
+
+ - dimension: channels
+ event_codes:
+ 1: CPU
+ 2: ISP
+ 3: GPU
+ 4: GE2D
+
+ reports:
+ - report_name: camera_stream_average_memory_bandwidth
+ id: 1
+ report_type: FLEETWIDE_MEANS
+ privacy_level: NO_ADDED_PRIVACY
+ system_profile_field: [OS, ARCH, BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL, REALM]
+
+ meta_data:
+ max_release_stage: GA
+ expiration_date: "2022/05/18"