Remove AppendResult* and SystemCommit* functions from perf_test.
They are unused. Bug: webrtc:8566 Change-Id: Iabc8b30c99f2fddc036f08dc70441db494cc5118 Reviewed-on: https://webrtc-review.googlesource.com/25180 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20838}
This commit is contained in:
@ -72,20 +72,6 @@ void PrintResult(const std::string& measurement,
|
||||
units, important);
|
||||
}
|
||||
|
||||
void AppendResult(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
size_t value,
|
||||
const std::string& units,
|
||||
bool important) {
|
||||
std::ostringstream value_stream;
|
||||
value_stream << value;
|
||||
output += ResultsToString(measurement, modifier, trace,
|
||||
value_stream.str(),
|
||||
"", "", units, important);
|
||||
}
|
||||
|
||||
void PrintResult(const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
@ -96,17 +82,6 @@ void PrintResult(const std::string& measurement,
|
||||
important);
|
||||
}
|
||||
|
||||
void AppendResult(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& value,
|
||||
const std::string& units,
|
||||
bool important) {
|
||||
output += ResultsToString(measurement, modifier, trace, value, "", "", units,
|
||||
important);
|
||||
}
|
||||
|
||||
void PrintResultMeanAndError(const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
@ -117,17 +92,6 @@ void PrintResultMeanAndError(const std::string& measurement,
|
||||
"{", "}", units, important);
|
||||
}
|
||||
|
||||
void AppendResultMeanAndError(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& mean_and_error,
|
||||
const std::string& units,
|
||||
bool important) {
|
||||
output += ResultsToString(measurement, modifier, trace, mean_and_error,
|
||||
"{", "}", units, important);
|
||||
}
|
||||
|
||||
void PrintResultList(const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
@ -138,40 +102,5 @@ void PrintResultList(const std::string& measurement,
|
||||
"[", "]", units, important);
|
||||
}
|
||||
|
||||
void AppendResultList(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& values,
|
||||
const std::string& units,
|
||||
bool important) {
|
||||
output += ResultsToString(measurement, modifier, trace, values,
|
||||
"[", "]", units, important);
|
||||
}
|
||||
|
||||
void PrintSystemCommitCharge(const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important) {
|
||||
PrintSystemCommitCharge(stdout, test_name, charge, important);
|
||||
}
|
||||
|
||||
void PrintSystemCommitCharge(FILE* target,
|
||||
const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important) {
|
||||
fprintf(target, "%s", SystemCommitChargeToString(test_name, charge,
|
||||
important).c_str());
|
||||
}
|
||||
|
||||
std::string SystemCommitChargeToString(const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important) {
|
||||
std::string trace_name(test_name);
|
||||
std::string output;
|
||||
AppendResult(output, "commit_charge", "", "cc" + trace_name, charge, "kb",
|
||||
important);
|
||||
return output;
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
@ -41,14 +41,6 @@ void PrintResult(const std::string& measurement,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
void AppendResult(std::string& output,
|
||||
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,
|
||||
@ -58,14 +50,6 @@ void PrintResult(const std::string& measurement,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
void AppendResult(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& value,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
// 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.
|
||||
@ -76,14 +60,6 @@ void PrintResultMeanAndError(const std::string& measurement,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
void AppendResultMeanAndError(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& mean_and_error,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
// Like PrintResult(), but prints an entire list of results. The |values|
|
||||
// will generally be a list of comma-separated numbers. A typical
|
||||
// post-processing step might produce plots of their mean and standard
|
||||
@ -95,28 +71,6 @@ void PrintResultList(const std::string& measurement,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
void AppendResultList(std::string& output,
|
||||
const std::string& measurement,
|
||||
const std::string& modifier,
|
||||
const std::string& trace,
|
||||
const std::string& values,
|
||||
const std::string& units,
|
||||
bool important);
|
||||
|
||||
// Prints memory commit charge stats for use by perf graphs.
|
||||
void PrintSystemCommitCharge(const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important);
|
||||
|
||||
void PrintSystemCommitCharge(FILE* target,
|
||||
const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important);
|
||||
|
||||
std::string SystemCommitChargeToString(const std::string& test_name,
|
||||
size_t charge,
|
||||
bool important);
|
||||
|
||||
// Converts list of values into comma-separated string for PrintResultList.
|
||||
template <typename Container>
|
||||
std::string ValuesToString(const Container& container) {
|
||||
|
@ -18,16 +18,15 @@ namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
TEST(PerfTest, AppendResult) {
|
||||
testing::internal::CaptureStdout();
|
||||
std::string expected = "RESULT measurementmodifier: trace= 42 units\n";
|
||||
std::string output;
|
||||
AppendResult(output, "measurement", "modifier", "trace", 42, "units", false);
|
||||
EXPECT_EQ(expected, output);
|
||||
std::cout << output;
|
||||
PrintResult("measurement", "modifier", "trace", 42, "units", false);
|
||||
|
||||
expected += "*RESULT foobar: baz= 7 widgets\n";
|
||||
AppendResult(output, "foo", "bar", "baz", 7, "widgets", true);
|
||||
PrintResult( "foo", "bar", "baz", 7, "widgets", true);
|
||||
|
||||
std::string output = testing::internal::GetCapturedStdout();
|
||||
EXPECT_EQ(expected, output);
|
||||
std::cout << output;
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
Reference in New Issue
Block a user