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
diff --git a/benchmarks/property_benchmark.cpp b/benchmarks/property_benchmark.cpp
index a099494..5760bf1 100644
--- a/benchmarks/property_benchmark.cpp
+++ b/benchmarks/property_benchmark.cpp
@@ -141,7 +141,7 @@
__system_property_get(pa.names[random() % nprops], value);
}
}
-BIONIC_BENCHMARK(BM_property_get);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_get, "NUM_PROPS");
static void BM_property_find(benchmark::State& state) {
const size_t nprops = state.range(0);
@@ -153,7 +153,7 @@
__system_property_find(pa.names[random() % nprops]);
}
}
-BIONIC_BENCHMARK(BM_property_find);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_find, "NUM_PROPS");
static void BM_property_read(benchmark::State& state) {
const size_t nprops = state.range(0);
@@ -176,7 +176,7 @@
delete[] pinfo;
}
-BIONIC_BENCHMARK(BM_property_read);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_read, "NUM_PROPS");
static void BM_property_serial(benchmark::State& state) {
const size_t nprops = state.range(0);
@@ -197,6 +197,6 @@
delete[] pinfo;
}
-BIONIC_BENCHMARK(BM_property_serial);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_serial, "NUM_PROPS");
#endif // __BIONIC__