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

Unified Diff: chrome/browser/metrics/perf/perf_provider_chromeos.h

Issue 1395273002: PerfProvider: Run a randomly selected perf command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@collection_params
Patch Set: Address comments on PS1 Created 5 years, 2 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
Index: chrome/browser/metrics/perf/perf_provider_chromeos.h
diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.h b/chrome/browser/metrics/perf/perf_provider_chromeos.h
index 0456516516be5d9ee48f1bbec96a3c9feb32d4ad..7a1f00a1d393fcb8f4b7256ab710155eef36bf3d 100644
--- a/chrome/browser/metrics/perf/perf_provider_chromeos.h
+++ b/chrome/browser/metrics/perf/perf_provider_chromeos.h
@@ -12,6 +12,8 @@
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "chrome/browser/metrics/perf/cpu_identity.h"
+#include "chrome/browser/metrics/perf/random_selector.h"
#include "chrome/browser/sessions/session_restore.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/login/login_state.h"
@@ -194,6 +196,9 @@ class PerfProvider : public base::NonThreadSafe,
// Parameters controlling how profiles are collected.
CollectionParams collection_params_;
+ // Set of commands to choose from.
+ RandomSelector command_selector_;
+
// Vector of SampledProfile protobufs containing perf profiles.
std::vector<SampledProfile> cached_perf_data_;
@@ -226,6 +231,15 @@ class PerfProvider : public base::NonThreadSafe,
DISALLOW_COPY_AND_ASSIGN(PerfProvider);
};
+namespace internal {
+
+// Exposed for unit testing.
Alexei Svitkine (slow) 2015/10/14 15:53:58 Nit: Put above the namespace.
dhsharp 2015/10/14 18:07:04 Done.
+
+std::vector<RandomSelector::WeightAndValue> GetDefaultCommandsForCpu(
Alexei Svitkine (slow) 2015/10/14 15:53:58 Add a comment describing the function.
dhsharp 2015/10/14 18:07:04 Done.
+ const CPUIdentity& cpuid);
+
+} // namespace internal
+
} // namespace metrics
#endif // CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698