add cache_write metric definition
Add Cobalt definition for the cache_write metric for FTS.
Bug: 44243
Test: fx build
Change-Id: I7a7dc2ac2fd6a603b0ca45691ffeb7e650422fc7
diff --git a/fuchsia/flash_ts/metrics.yaml b/fuchsia/flash_ts/metrics.yaml
index 63f5d8c..e2e3d7a 100644
--- a/fuchsia/flash_ts/metrics.yaml
+++ b/fuchsia/flash_ts/metrics.yaml
@@ -78,4 +78,40 @@
system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
meta_data:
max_release_stage: GA
- expiration_date: "2021/01/21"
\ No newline at end of file
+ expiration_date: "2021/01/21"
+
+#####################################################################
+# cache_write
+#
+# Count of times we attempted to write properties to Isolated
+# Persistent Storage. This metric is intended to help debug cache
+# problems.
+#
+# Because the storage is persistent, we expect that this metric will
+# be reported only once per device. However, if a) writing fails,
+# b) the device suffers filesystem corruption, or c) the device is
+# factory-reset, then the metric will be reported multiple times.
+#####################################################################
+- id: 3
+ metric_name: cache_write
+ metric_type: EVENT_OCCURRED
+ metric_dimensions:
+ - dimension: result
+ event_codes:
+ 0: Success
+ 1: IoError
+ max_event_code: 1
+ reports:
+ #####################################################################
+ # cache_write_counts
+ #
+ # Count of each of the types of cache_read occurrences.
+ #####################################################################
+ - report_name: cache_write_counts
+ id: 1
+ report_type: SIMPLE_OCCURRENCE_COUNT
+ local_privacy_noise_level: NONE
+ system_profile_field: [BOARD_NAME, PRODUCT_NAME, SYSTEM_VERSION, CHANNEL]
+ meta_data:
+ max_release_stage: GA
+ expiration_date: "2021/01/21"