Reland "Flip histograms to true by default, fix unit in isac_fix_test."

This reverts commit c59a3049016f697e05437b91ae494c40cede3506.

Reason for revert: Other perf tests greening up, can now land this

Original change's description:
> Revert "Flip histograms to true by default, fix unit in isac_fix_test."
> 
> This reverts commit 7b201012bc7f7cd95249b8314d0d7ebabe966d8b.
> 
> Reason for revert: Seems to work, but need to get low bw tests working first
> 
> Original change's description:
> > Flip histograms to true by default, fix unit in isac_fix_test.
> > 
> > Requires downstream changes for all WebRTC perf tests, and
> > a corresponding recipe change so isac_fix_test starts using the new
> > flow.
> > 
> > Bug: chromium:1029452
> > Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30906}
> 
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> 
> Change-Id: I96c2309cd71be14c5a27b515736a32f1b256453c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1029452
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171865
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30913}

TBR=phoglund@webrtc.org,mbonadei@webrtc.org

Change-Id: If39500beeca74b8e0ed9e97724a55529125a2253
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171876
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30920}
This commit is contained in:
Patrik Höglund
2020-03-27 13:05:08 +00:00
committed by Commit Bot
parent d59805b3fb
commit 36b35d528c
3 changed files with 12 additions and 11 deletions

View File

@ -97,6 +97,9 @@ TEST_F(PerfTest, MAYBE_TestPrintResult) {
}
TEST_F(PerfTest, TestGetPerfResultsJSON) {
bool original_flag = absl::GetFlag(FLAGS_write_histogram_proto_json);
absl::SetFlag(&FLAGS_write_histogram_proto_json, false);
PrintResult("measurement", "modifier", "trace", 42, "units", false);
PrintResult("foo", "bar", "baz_v", 7, "widgets", true);
PrintResultMeanAndError("foo", "bar", "baz_me", 1, 2, "lemurs", false);
@ -104,19 +107,19 @@ TEST_F(PerfTest, TestGetPerfResultsJSON) {
PrintResultList("foo", "bar", "baz_vl", kListOfScalars, "units", false);
EXPECT_EQ(RemoveSpaces(kJsonExpected), GetPerfResults());
absl::SetFlag(&FLAGS_write_histogram_proto_json, original_flag);
}
TEST_F(PerfTest, TestClearPerfResults) {
PrintResult("measurement", "modifier", "trace", 42, "units", false);
ClearPerfResults();
EXPECT_EQ(R"({"format_version":"1.0","charts":{}})", GetPerfResults());
EXPECT_EQ("", GetPerfResults());
}
#if WEBRTC_ENABLE_PROTOBUF
TEST_F(PerfTest, TestGetPerfResultsHistograms) {
bool original_flag = absl::GetFlag(FLAGS_write_histogram_proto_json);
absl::SetFlag(&FLAGS_write_histogram_proto_json, true);
PrintResult("measurement", "_modifier", "story_1", 42, "ms", false);
PrintResult("foo", "bar", "story_1", 7, "sigma", true);
// Note: the error will be ignored, not supported by histograms.
@ -153,8 +156,6 @@ TEST_F(PerfTest, TestGetPerfResultsHistograms) {
EXPECT_EQ(hist2.name(), "measurement_modifier");
EXPECT_EQ(hist2.unit().unit(), proto::MS_BEST_FIT_FORMAT);
absl::SetFlag(&FLAGS_write_histogram_proto_json, original_flag);
}
TEST_F(PerfTest, TestClearPerfResultsHistograms) {