Commit add166ae authored by Michael Montvelishsky's avatar Michael Montvelishsky Committed by Commit Bot

Add test name to benchmark report.

Explicit benchmark (unittest) name in the benchmark result record makes
it easier to read and/or automatically collect into benchmarks table.

Bug: 158517134
Test: build and run
Change-Id: I5c9de48c052d411a5facf09eaceaf613ae0667c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236603
Auto-Submit: Michael Montvelishsky <mont@chromium.org>
Commit-Queue: Kenneth MacKay <kmackay@chromium.org>
Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776297}
parent eb16b028
...@@ -245,7 +245,10 @@ void AudioProcessorBenchmark(AudioPostProcessor2* pp, ...@@ -245,7 +245,10 @@ void AudioProcessorBenchmark(AudioPostProcessor2* pp,
pp->ProcessFrames(&data_in[i], kBufSizeFrames, 1.0, 0.0); pp->ProcessFrames(&data_in[i], kBufSizeFrames, 1.0, 0.0);
} }
clock_t stop_clock = clock(); clock_t stop_clock = clock();
LOG(INFO) << "At " << sample_rate const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
LOG(INFO) << test_info->test_suite_name() << "." << test_info->name()
<< " At " << sample_rate
<< " frames per second CPU usage: " << std::defaultfloat << " frames per second CPU usage: " << std::defaultfloat
<< 100.0 * (stop_clock - start_clock) / << 100.0 * (stop_clock - start_clock) /
(CLOCKS_PER_SEC * effective_duration) (CLOCKS_PER_SEC * effective_duration)
......
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