| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |