Improve comment in perf_test.h.

I think these functions are so hard to understand, so I tried to
make an as grounded example as possible.

Bug: chromium:1029452
Change-Id: I5d4284bc15b39cb94ba42d2c483a619ecf42fb91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168945
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30590}
This commit is contained in:
Patrik Höglund
2020-02-24 09:13:14 +01:00
committed by Commit Bot
parent 1db70d5c7b
commit c1cf4b5491

View File

@ -22,7 +22,6 @@
namespace webrtc {
namespace test {
// Metrics improver direction.
enum class ImproveDirection {
// Direction is undefined.
kNone,
@ -32,22 +31,24 @@ enum class ImproveDirection {
kBiggerIsBetter,
};
// Prints numerical information to stdout in a controlled format, for
// post-processing. |measurement| is a description of the quantity being
// measured, e.g. "vm_peak"; |modifier| is provided as a convenience and
// will be appended directly to the name of the |measurement|, e.g.
// "_browser"; |trace| is a description of the particular data point, e.g.
// "reference"; |value| is the measured value; and |units| is a description
// of the units of measure, e.g. "bytes". If |important| is true, the output
// line will be specially marked, to notify the post-processor. The strings
// may be empty. They should not contain any colons (:) or equals signs (=).
// A typical post-processing step would be to produce graphs of the data
// produced for various builds, using the combined |measurement| + |modifier|
// string to specify a particular graph and the |trace| to identify a trace
// (i.e., data series) on that graph.
// Prints a performance test result.
//
// For example,
// PrintResult("ramp_up_time_", "turn_over_tcp",
// "bwe_15s", 1234.2, "ms", false);
//
// will show up in the http://chromeperf.appspot.com under
//
// (test binary name) > (bot) > ramp_up_time_turn_over_tcp > bwe_15s.
//
// The |measurement| + |modifier| is what we're measuring. |user_story| is the
// scenario we're testing under.
//
// The binary this runs in must be hooked up as a perf test in the WebRTC
// recipes for this to actually be uploaded to chromeperf.appspot.com.
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& user_story,
const double value,
const std::string& units,
bool important,
@ -56,10 +57,11 @@ void PrintResult(const std::string& measurement,
// Like PrintResult(), but prints a (mean, standard deviation) result pair.
// The |<values>| should be two comma-separated numbers, the mean and
// standard deviation (or other error metric) of the measurement.
// DEPRECATED: soon unsupported.
void PrintResultMeanAndError(
const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& user_story,
const double mean,
const double error,
const std::string& units,
@ -73,7 +75,7 @@ void PrintResultMeanAndError(
void PrintResultList(
const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& user_story,
rtc::ArrayView<const double> values,
const std::string& units,
bool important,
@ -83,7 +85,7 @@ void PrintResultList(
// counter. Also add specified metric to the plotable metrics output.
void PrintResult(const std::string& measurement,
const std::string& modifier,
const std::string& trace,
const std::string& user_story,
const SamplesStatsCounter& counter,
const std::string& units,
const bool important,