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

Unified Diff: apps/benchmark/benchmark_app.cc

Issue 1394963002: Adds a couple more measures to the benchmarking app (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Format 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
« no previous file with comments | « no previous file | apps/benchmark/measurements.h » ('j') | apps/benchmark/measurements.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/benchmark/benchmark_app.cc
diff --git a/apps/benchmark/benchmark_app.cc b/apps/benchmark/benchmark_app.cc
index bd7c8a99b1269a2b751dc0f282efde5321e2a9c6..8c88d89415b89fd5b364e07f0d96ec959b0c69e2 100644
--- a/apps/benchmark/benchmark_app.cc
+++ b/apps/benchmark/benchmark_app.cc
@@ -116,13 +116,18 @@ class BenchmarkApp : public mojo::ApplicationDelegate,
bool succeeded = true;
Measurements measurements(events, time_origin_);
for (const Measurement& measurement : args_.measurements) {
- double result = measurements.Measure(measurement);
- if (result >= 0.0) {
- printf("measurement: %s %lf\n", measurement.spec.c_str(), result);
- } else {
- succeeded = false;
- printf("measurement: %s FAILED\n", measurement.spec.c_str());
+ std::vector<double> results;
+ measurements.Measure(measurement, &results);
+ printf("measurement: %s", measurement.spec.c_str());
+ for (double result : results) {
ppi 2015/10/08 22:29:47 As discussed offline, I think it would be good to
zra 2015/10/09 14:51:15 Done.
+ if (result >= 0.0) {
+ printf(" %lf", result);
+ } else {
+ succeeded = false;
+ printf(" FAILED");
+ }
}
+ printf("\n");
}
// Scripts that run benchmarks can pick this up as a signal that the run
« no previous file with comments | « no previous file | apps/benchmark/measurements.h » ('j') | apps/benchmark/measurements.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698