Make PrintResult receive a double instead of a string.

It will be easier to make perf results output to JSON if the PrintResult*
functions receive doubles instead of strings.

I'll make follow-up CLs for PrintResultMeanAndError and PrintResultList.

Bug: webrtc:8566
Change-Id: I198e422a7bb8cd237c6364af98d2f67f0858452e
Reviewed-on: https://webrtc-review.googlesource.com/25300
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20848}
This commit is contained in:
Edward Lemur
2017-11-22 19:17:50 +01:00
committed by Commit Bot
parent 2af5fff6d5
commit 6a82207e4e
3 changed files with 5 additions and 24 deletions

View File

@ -217,10 +217,10 @@ void BweTest::PrintResults(double max_throughput_kbps,
double utilization = throughput_kbps.GetMean() / max_throughput_kbps;
webrtc::test::PrintResult("BwePerformance", GetTestName(), "Utilization",
utilization * 100.0, "%", false);
webrtc::test::PrintResult(
"BwePerformance", GetTestName(), "Utilization var coeff",
throughput_kbps.GetStdDev() / throughput_kbps.GetMean(), "", false);
std::stringstream ss;
ss << throughput_kbps.GetStdDev() / throughput_kbps.GetMean();
webrtc::test::PrintResult("BwePerformance", GetTestName(),
"Utilization var coeff", ss.str(), "", false);
for (auto& kv : flow_throughput_kbps) {
ss.str("");
ss << "Throughput flow " << kv.first;

View File

@ -63,7 +63,7 @@ namespace test {
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
size_t value,
const double value,
const std::string& units,
bool important) {
std::ostringstream value_stream;
@ -72,16 +72,6 @@ void PrintResult(const std::string& measurement,
units, important);
}
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& value,
const std::string& units,
bool important) {
PrintResultsImpl(measurement, modifier, trace, value, "", "", units,
important);
}
void PrintResultMeanAndError(const std::string& measurement,
const std::string& modifier,
const std::string& trace,

View File

@ -37,16 +37,7 @@ namespace test {
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
size_t value,
const std::string& units,
bool important);
// Like the above version of PrintResult(), but takes a std::string value
// instead of a size_t.
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& value,
const double value,
const std::string& units,
bool important);