Index: apps/benchmark/run_args.cc |
diff --git a/apps/benchmark/run_args.cc b/apps/benchmark/run_args.cc |
index 8921a96137596001f453a2fb6bead5c47180975f..9f6dd8d52b8fb998a9ad2ab6811de0eff3664416 100644 |
--- a/apps/benchmark/run_args.cc |
+++ b/apps/benchmark/run_args.cc |
@@ -53,6 +53,20 @@ bool GetMeasurement(const std::string& measurement_spec, Measurement* result) { |
return false; |
*result = Measurement(MeasurementType::AVG_DURATION, |
EventSpec(parts[2], parts[1])); |
+ } else if (parts[0] == "percentile_duration") { |
+ if (!CheckMeasurementFormat(parts[0], 4, parts.size())) |
+ return false; |
+ *result = Measurement(MeasurementType::PERCENTILE_DURATION, |
+ EventSpec(parts[2], parts[1])); |
+ if (!base::StringToDouble(parts[3], &result->param)) { |
+ LOG(ERROR) << "Expected '" << parts[3] |
+ << "'' to be a number in: " << measurement_spec; |
+ return false; |
+ } |
+ if ((result->param < 0.0) || (result->param > 1.0)) { |
+ LOG(ERROR) << "Expected '" << result->param << "' to be >0.0 and <=1.0 " |
ppi
2015/10/13 03:55:00
s/>0.0/>=0.0s
zra
2015/10/13 05:09:26
Done.
|
+ << "in " << measurement_spec; |
+ } |
} else { |
LOG(ERROR) << "Could not recognize the measurement type: " << parts[0]; |
return false; |