diff options
author | Christopher Ferris <cferris@google.com> | 2017-11-30 08:53:15 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2017-11-30 09:09:41 -0800 |
commit | 858e33698d947a686fa59ed0206ce7c6656d3439 (patch) | |
tree | 74da61c257264c74bb683c5a7d7e0d387b53ac50 /benchmarks/stdio_benchmark.cpp | |
parent | 27d4977f1f4d0b4cbd67bd0cfc29d4d8cfff96f1 (diff) |
Generate all the benchmarks to run.
Instead of requiring the need to maintain a list of all the benchmarks,
add a programmatic way to generate all of the benchmarks.
This generation runs the benchmarks in alphabetical order.
Add a new macro BIONIC_BENCHMARK_WITH_ARG that will be the default argument
to pass to the benchmark. Change the benchmarks that require default arguments.
Add a small example xml file, and remove the full.xml/host.xml files.
Update readme.
Test: Ran new unit tests, verified all tests are added.
Change-Id: I8036daeae7635393222a7a92d18f34119adba745
Diffstat (limited to 'benchmarks/stdio_benchmark.cpp')
-rw-r--r-- | benchmarks/stdio_benchmark.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/benchmarks/stdio_benchmark.cpp b/benchmarks/stdio_benchmark.cpp index 76e9ddb13..d547fedec 100644 --- a/benchmarks/stdio_benchmark.cpp +++ b/benchmarks/stdio_benchmark.cpp @@ -59,22 +59,22 @@ void ReadWriteTest(benchmark::State& state, Fn f, bool buffered) { void BM_stdio_fread(benchmark::State& state) { ReadWriteTest(state, fread, true); } -BIONIC_BENCHMARK(BM_stdio_fread); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fread, "AT_COMMON_SIZES"); void BM_stdio_fwrite(benchmark::State& state) { ReadWriteTest(state, fwrite, true); } -BIONIC_BENCHMARK(BM_stdio_fwrite); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fwrite, "AT_COMMON_SIZES"); void BM_stdio_fread_unbuffered(benchmark::State& state) { ReadWriteTest(state, fread, false); } -BIONIC_BENCHMARK(BM_stdio_fread_unbuffered); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fread_unbuffered, "AT_COMMON_SIZES"); void BM_stdio_fwrite_unbuffered(benchmark::State& state) { ReadWriteTest(state, fwrite, false); } -BIONIC_BENCHMARK(BM_stdio_fwrite_unbuffered); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fwrite_unbuffered, "AT_COMMON_SIZES"); #if !defined(__GLIBC__) static void FopenFgetlnFclose(benchmark::State& state, bool no_locking) { @@ -165,12 +165,12 @@ static void FopenFgetcFclose(benchmark::State& state, bool no_locking) { static void BM_stdio_fopen_fgetc_fclose_locking(benchmark::State& state) { FopenFgetcFclose(state, false); } -BIONIC_BENCHMARK(BM_stdio_fopen_fgetc_fclose_locking); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fopen_fgetc_fclose_locking, "1024"); void BM_stdio_fopen_fgetc_fclose_no_locking(benchmark::State& state) { FopenFgetcFclose(state, true); } -BIONIC_BENCHMARK(BM_stdio_fopen_fgetc_fclose_no_locking); +BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fopen_fgetc_fclose_no_locking, "1024"); static void BM_stdio_printf_literal(benchmark::State& state) { while (state.KeepRunning()) { |