1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CC_METRICS_UKM_SMOOTHNESS_DATA_H_ 6 #define CC_METRICS_UKM_SMOOTHNESS_DATA_H_ 7 8 #include "device/base/synchronization/one_writer_seqlock.h" 9 10 namespace cc { 11 12 // The smoothness metrics, containing the score measured using various 13 // normalization strategies. The normalization strategies are detailed in 14 // https://docs.google.com/document/d/1ENJXn2bPqvxycnVS9X35qDu1642DQyz42upj5ETOhSs/preview 15 struct UkmSmoothnessData { 16 double avg_smoothness = 0.0; 17 double worst_smoothness = 0.0; 18 double above_threshold = 0.0; 19 double percentile_95 = 0.0; 20 }; 21 22 // The struct written in shared memory to transport UkmSmoothnessData across 23 // processes. |data| is protected by the sequence-lock |seq_lock|. 24 struct UkmSmoothnessDataShared { 25 device::OneWriterSeqLock seq_lock; 26 struct UkmSmoothnessData data; 27 }; 28 29 } // namespace cc 30 31 #endif // CC_METRICS_UKM_SMOOTHNESS_DATA_H_ 32