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

Unified 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: fix multiline comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/call_stack_profile_metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/call_stack_profile_metrics_provider.h
diff --git a/components/metrics/call_stack_profile_metrics_provider.h b/components/metrics/call_stack_profile_metrics_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..a2bb0f85a31bd8de9d0c53ad4d138ed1940aed4a
--- /dev/null
+++ b/components/metrics/call_stack_profile_metrics_provider.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
+#define COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
+
+#include <vector>
+
+#include "base/profiler/stack_sampling_profiler.h"
+#include "components/metrics/metrics_provider.h"
+
+namespace metrics {
+class ChromeUserMetricsExtension;
+
+// Performs metrics logging for the stack sampling profiler.
+class CallStackProfileMetricsProvider : public MetricsProvider {
+ public:
+ CallStackProfileMetricsProvider();
+ ~CallStackProfileMetricsProvider() override;
+
+ // MetricsProvider:
+ void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override;
+
+ // Uses |profiles| as the source data for the next invocation of
+ // ProvideGeneralMetrics, rather than sourcing them from the
+ // StackSamplingProfiler.
+ void SetSourceProfilesForTesting(
+ const std::vector<base::StackSamplingProfiler::Profile>& profiles);
+
+ private:
+ std::vector<base::StackSamplingProfiler::Profile> source_profiles_for_test_;
+
+ DISALLOW_COPY_AND_ASSIGN(CallStackProfileMetricsProvider);
+};
+
+} // namespace metrics
+
+#endif // COMPONENTS_METRICS_CALL_STACK_PROFILE_METRICS_PROVIDER_H_
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/call_stack_profile_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698