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

Unified Diff: cc/debug/lap_timer.cc

Issue 1082103003: Make a couple of SurfaceAggregatorPerfTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « cc/debug/lap_timer.h ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/lap_timer.cc
diff --git a/cc/debug/lap_timer.cc b/cc/debug/lap_timer.cc
index 10d26f94f4de514b0094b464efeec0dddf7a37f1..17bca3d313f11869563d90728bbb46741b345d9e 100644
--- a/cc/debug/lap_timer.cc
+++ b/cc/debug/lap_timer.cc
@@ -15,6 +15,11 @@ base::TimeTicks Now() {
: base::TimeTicks::Now();
}
+// Default values.
+static const int kTimeLimitMillis = 3000;
+static const int kWarmupRuns = 5;
+static const int kTimeCheckInterval = 10;
+
} // namespace
LapTimer::LapTimer(int warmup_laps,
@@ -29,6 +34,12 @@ LapTimer::LapTimer(int warmup_laps,
Reset();
}
+LapTimer::LapTimer()
+ : LapTimer(kWarmupRuns,
+ base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
+ kTimeCheckInterval) {
+}
+
void LapTimer::Reset() {
accumulator_ = base::TimeDelta();
num_laps_ = 0;
« no previous file with comments | « cc/debug/lap_timer.h ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698