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

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

Issue 364913007: metrics: Add random delays to perf collection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Schedule new collection before early return Created 6 years, 5 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_provider_chromeos.h
diff --git a/chrome/browser/metrics/perf_provider_chromeos.h b/chrome/browser/metrics/perf_provider_chromeos.h
index 8f1ac2f830a0bef4d3fdb0055923a91ae695cc94..9b380e4f137af6b877aa262102d6226f561703d7 100644
--- a/chrome/browser/metrics/perf_provider_chromeos.h
+++ b/chrome/browser/metrics/perf_provider_chromeos.h
@@ -75,7 +75,7 @@ class PerfProvider : public base::NonThreadSafe,
// Selects a random time in the upcoming profiling interval that begins at
// |next_profiling_interval_start_|. Schedules |timer_| to invoke
// DoPeriodicCollection() when that time comes.
- void ScheduleCollection();
+ void ScheduleIntervalCollection();
// Collects perf data for a given |trigger_event|. Calls perf via the ChromeOS
// debug daemon's dbus interface.
@@ -85,6 +85,17 @@ class PerfProvider : public base::NonThreadSafe,
// reschedules it to be collected again.
void DoPeriodicCollection();
+ // Collects perf data after a resume. |sleep_duration| is the duration the
+ // system was suspended before resuming. |time_after_resume_ms| is how long
+ // ago the system resumed.
+ void CollectPerfDataAfterResume(const base::TimeDelta& sleep_duration,
+ const base::TimeDelta& time_after_resume);
+
+ // Collects perf data after a session restore. |time_after_restore| is how
+ // long ago the session restore started.
+ void CollectPerfDataAfterSessionRestore(
+ const base::TimeDelta& time_after_restore);
+
// Parses a perf data protobuf from the |data| passed in only if the
// |incognito_observer| indicates that no incognito window had been opened
// during the profile collection period.
« no previous file with comments | « no previous file | chrome/browser/metrics/perf_provider_chromeos.cc » ('j') | chrome/browser/metrics/perf_provider_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698