1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_METRICS_UKM_SMOOTHNESS_DATA_H_
6 #define CC_METRICS_UKM_SMOOTHNESS_DATA_H_
8 #include "base/time/time.h"
9 #include "cc/cc_export.h"
10 #include "cc/metrics/shared_metrics_buffer.h"
14 // The smoothness metrics, containing the score measured using various
15 // normalization strategies. The normalization strategies are detailed in
16 // https://docs.google.com/document/d/1ENJXn2bPqvxycnVS9X35qDu1642DQyz42upj5ETOhSs/preview
17 struct CC_EXPORT UkmSmoothnessData {
20 double avg_smoothness = 0.0;
21 double worst_smoothness = 0.0;
22 double median_smoothness = 0.0;
24 // Values are set to -1 to help with recognizing when these metrics are not
26 double worst_smoothness_after1sec = -1.0;
27 double worst_smoothness_after2sec = -1.0;
28 double worst_smoothness_after5sec = -1.0;
30 double above_threshold = 0.0;
31 double percentile_95 = 0.0;
32 double variance = 0.0;
33 double buckets[7] = {0};
35 double scroll_focused_median = 0.0;
36 double scroll_focused_percentile_95 = 0.0;
37 double scroll_focused_variance = 0.0;
39 double main_focused_median = 0.0;
40 double main_focused_percentile_95 = 0.0;
41 double main_focused_variance = 0.0;
43 double compositor_focused_median = 0.0;
44 double compositor_focused_percentile_95 = 0.0;
45 double compositor_focused_variance = 0.0;
48 using UkmSmoothnessDataShared = SharedMetricsBuffer<UkmSmoothnessData>;
52 #endif // CC_METRICS_UKM_SMOOTHNESS_DATA_H_