summaryrefslogtreecommitdiff
path: root/benchmarks/stdlib_benchmark.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2017-11-30 08:53:15 -0800
committerChristopher Ferris <cferris@google.com>2017-11-30 09:09:41 -0800
commit858e33698d947a686fa59ed0206ce7c6656d3439 (patch)
tree74da61c257264c74bb683c5a7d7e0d387b53ac50 /benchmarks/stdlib_benchmark.cpp
parent27d4977f1f4d0b4cbd67bd0cfc29d4d8cfff96f1 (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/stdlib_benchmark.cpp')
-rw-r--r--benchmarks/stdlib_benchmark.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmarks/stdlib_benchmark.cpp b/benchmarks/stdlib_benchmark.cpp
index eb325abbb..0bee683e4 100644
--- a/benchmarks/stdlib_benchmark.cpp
+++ b/benchmarks/stdlib_benchmark.cpp
@@ -33,7 +33,7 @@ static void BM_stdlib_malloc_free(benchmark::State& state) {
state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
}
-BIONIC_BENCHMARK(BM_stdlib_malloc_free);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_malloc_free, "AT_COMMON_SIZES");
static void BM_stdlib_mbstowcs(benchmark::State& state) {
const size_t buf_alignment = state.range(0);
@@ -76,7 +76,7 @@ static void BM_stdlib_mbstowcs(benchmark::State& state) {
state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));
}
-BIONIC_BENCHMARK(BM_stdlib_mbstowcs);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_mbstowcs, "0 0");
static void BM_stdlib_mbrtowc(benchmark::State& state) {
const size_t buf_alignment = state.range(0);
@@ -117,4 +117,4 @@ static void BM_stdlib_mbrtowc(benchmark::State& state) {
state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));
}
-BIONIC_BENCHMARK(BM_stdlib_mbrtowc);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_mbrtowc, "0");