1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cc / metrics / custom_metrics_recorder.h [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_METRICS_CUSTOM_METRICS_RECORDER_H_
#define CC_METRICS_CUSTOM_METRICS_RECORDER_H_
#include <vector>
#include "cc/cc_export.h"
#include "cc/metrics/event_latency_tracker.h"
namespace cc {
// Customize cc metric recording. E.g. reporting metrics under different names.
class CC_EXPORT CustomMetricRecorder {
public:
static CustomMetricRecorder* Get();
// Invoked to report "PercentDroppedFrames_1sWindow2".
virtual void ReportPercentDroppedFramesInOneSecondWindow2(double percent) = 0;
// Invoked to report event latencies.
virtual void ReportEventLatency(
std::vector<EventLatencyTracker::LatencyData> latencies) = 0;
protected:
CustomMetricRecorder();
virtual ~CustomMetricRecorder();
};
} // namespace cc
#endif // CC_METRICS_CUSTOM_METRICS_RECORDER_H_