Commit 49c033b6 authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Switch views_perftests to histograms

Switches views_perftests to use PerfResultReporter instead of
PrintResult directly and whitelists it for conversion to histograms
before uploading to the perf dashboard.

Bug: 923564
Change-Id: I7e4b90b136aa554be6effa479e5d286f6f78e0e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797339
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695601}
parent d2057456
......@@ -57,6 +57,7 @@ GTEST_CONVERSION_WHITELIST = [
'cc_perftests',
'gpu_perftests',
'media_perftests',
'views_perftests',
'xr.vr.common_perftests',
]
......
......@@ -6,7 +6,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/timer/lap_timer.h"
#include "testing/perf/perf_test.h"
#include "testing/perf/perf_result_reporter.h"
#include "ui/views/test/views_test_base.h"
namespace views {
......@@ -34,8 +34,9 @@ TEST_F(LabelPerfTest, GetPreferredSize) {
label.GetPreferredSize();
timer.NextLap();
}
perf_test::PrintResult("LabelPerfTest", std::string(), "GetPreferredSize",
timer.LapsPerSecond(), "runs/s", true);
perf_test::PerfResultReporter reporter("LabelPerfTest", "GetPreferredSize");
reporter.RegisterImportantMetric("", "runs/s");
reporter.AddResult("", timer.LapsPerSecond());
}
} // namespace views
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment