Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: components/metrics/call_stack_profile_metrics_provider.h

Issue 981143006: Metrics provider for statistical stack profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: handle unknown module (per other review) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
6 #define COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
7
8 #include <vector>
9
10 #include "base/profiler/stack_sampling_profiler.h"
11 #include "components/metrics/metrics_provider.h"
12
13 namespace metrics {
14 class ChromeUserMetricsExtension;
15
16 // Performs metrics logging for the stack sampling profiler.
17 class CallStackProfileMetricsProvider : public metrics::MetricsProvider {
18 public:
19 CallStackProfileMetricsProvider();
20 ~CallStackProfileMetricsProvider() override;
21
22 // metrics::MetricsProvider:
23 void ProvideGeneralMetrics(
24 metrics::ChromeUserMetricsExtension* uma_proto) override;
25
26 // Uses |profiles| as the source data for the next invocation of
27 // ProvideGeneralMetrics, rather than sourcing them from the
28 // StackSamplingProfiler.
29 void SetSourceProfilesForTesting(
30 const std::vector<base::StackSamplingProfiler::Profile>& profiles);
31
32 private:
33 std::vector<base::StackSamplingProfiler::Profile> source_profiles_for_test_;
34
35 DISALLOW_COPY_AND_ASSIGN(CallStackProfileMetricsProvider);
36 };
37
38 } // namespace metrics
39
40 #endif // COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698