Commit graph

6 commits

Author SHA1 Message Date
Christopher Ferris
df4942c04a Refactor the benchmark code.
Changes:
- Modify the benchmarks to derive from a single Benchmark object.
- Rewrite the main iteration code. This includes changing the iteration
  code to use the actual total time calculated by the benchmark as a basis
  for determining whether there are enough iterations instead of using
  the time it takes to run the benchmark.
- Allow benchmarks to take no argument, int, or double.
- Fix the PrettyInt printer for negative integers.
- Modify the max column width name to include the whole name including
  the arg part.
- Reformat property_benchmark.cpp in line with the rest of the code.
- Modify a few of the math benchmarks to take an argument instead of
  separate benchmarks for the same function with different args.
- Create a vector of regex_t structs to represent the args all at
  once instead of when running each benchmark.

This change is in preparation for adding new math based benchmarks.

Tested by running on a nexus flo running at max using the new code
and the old code and comparing. All of the numbers are similar, but
some of the iterations are different due to the slightly different
algorithm used.

Change-Id: I57ad1f3ff083282b9ffeb72e687cab369ce3523a
2015-02-19 14:58:24 -08:00
Christopher Ferris
53531ccebb Make sure not to construct illegal property names.
Change-Id: I37624e69aec51efd4291f076fb87af3f35d33025
2014-07-15 19:26:28 -07:00
Brigid Smith
28417e6314 Added a __system_property_serial benchmark.
Change-Id: Ifc2116f26acb242f4dcdb6eefe128899a9dc63bb
2014-07-09 15:48:37 -07:00
Brigid Smith
a304476145 Added __system_propery_read benchmark.
Change-Id: Ic0e9118859a013aa04841de25822a81a7fc74b3c
2014-07-09 10:26:17 -07:00
Christopher Ferris
8b1ade5c0b Modify hard-coded directory.
Use the ANDROID_DATA environment variable instead of the hard-coded
directory for these benchmarks.

Change-Id: I00bae7b4a24e81e77fc8f52e1fe99f4d4918f520
2014-05-01 13:10:48 -07:00
Colin Cross
bd3efbc9b5 bionic: move benchmarks out of tests directory
Change-Id: I4d054965198af22c9a9c821d1bc53f4e9ea01248
2013-12-10 18:24:30 -08:00
Renamed from tests/property_benchmark.cpp (Browse further)