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

Side by Side Diff: apps/benchmark/run_args.cc

Issue 1316163003: Support duration events in `benchmark.mojo`. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « apps/benchmark/measurements_unittest.cc ('k') | mojo/tools/data/benchmarks » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "apps/benchmark/run_args.h" 5 #include "apps/benchmark/run_args.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 27
28 if (parts[0] == "time_until") { 28 if (parts[0] == "time_until") {
29 result->type = MeasurementType::TIME_UNTIL; 29 result->type = MeasurementType::TIME_UNTIL;
30 } else if (parts[0] == "avg_duration") { 30 } else if (parts[0] == "avg_duration") {
31 result->type = MeasurementType::AVG_DURATION; 31 result->type = MeasurementType::AVG_DURATION;
32 } else { 32 } else {
33 LOG(ERROR) << "Could not recognize the measurement type: " << parts[0]; 33 LOG(ERROR) << "Could not recognize the measurement type: " << parts[0];
34 return false; 34 return false;
35 } 35 }
36 36
37 result->target_event.category = parts[1]; 37 result->target_event.categories = parts[1];
38 result->target_event.name = parts[2]; 38 result->target_event.name = parts[2];
39 result->spec = measurement_spec; 39 result->spec = measurement_spec;
40 return true; 40 return true;
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 RunArgs::RunArgs() {} 45 RunArgs::RunArgs() {}
46 46
47 RunArgs::~RunArgs() {} 47 RunArgs::~RunArgs() {}
(...skipping 27 matching lines...) Expand all
75 if (!GetMeasurement(measurement_spec, &measurement)) { 75 if (!GetMeasurement(measurement_spec, &measurement)) {
76 return false; 76 return false;
77 } 77 }
78 result->measurements.push_back(measurement); 78 result->measurements.push_back(measurement);
79 } 79 }
80 80
81 return true; 81 return true;
82 } 82 }
83 83
84 } // namespace benchmark 84 } // namespace benchmark
OLDNEW
« no previous file with comments | « apps/benchmark/measurements_unittest.cc ('k') | mojo/tools/data/benchmarks » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698