Commit graph

18 commits

Author SHA1 Message Date
Christopher Ferris
9ac0cd5f85 Fix test failures.
- Fix the help output for new benchmarks help output.
- Fix incorrect regex for sanitizing output.

Test: Ran unit tests and they pass.
Change-Id: I227eef3ce8c4ce639321e5ab8a57d0877063ede1
2018-11-07 14:30:55 -08:00
Christopher Ferris
18cbed7008 Make the test less specific.
Remove the need to add every benchmark to the list of all benchmarks.

Also, add some hard-coding of the location of the benchmark executable.
Add a test to make sure the benchmark exists so it's possible to detect
if the executable changes location.

Finally, make the tests isolated so that they finish in half the time.

Test: Ran unit tests.
Change-Id: I1e59eb283e31d29b14e54c44ac865827c9704127
2018-10-19 14:05:14 -07:00
Peter Collingbourne
c282ca9f44 benchmarks: Fix the benchmark tests.
Update the list of benchmarks to include the recently added strncmp
benchmarks.
2018-09-13 16:06:01 -07:00
Christopher Ferris
0dc784431b Add new malloc benchmarks.
This runs through the trace of the allocations in a sql benchmark app
executed in the benchmark thread.

Add one benchmark with decay time set to 0 and another with decay time
set to 1.

Include a script that can generate a header file that can be used to
regenerate the data.

Bug: 112317428

Test: Builds, ran unit tests, ran benchmarks.
Change-Id: I62e287cc06b74b74bcc5a4bbee71b0fac0a196fd
2018-08-14 16:01:58 -07:00
Haibo Huang
510dda3ea1 Fix benchmark-tests
1. fix all_benchmarks. Some new benchmarks were added.
2. move some benchmark suites to the right place.
3. add unit test for https://android-review.googlesource.com/c/platform/bionic/+/724785

Test: compile and run bionic-benchmarks-tests on device.
Change-Id: I2b686b51910a422b664f9ea968199f37944039c0
2018-08-11 23:43:03 -07:00
Christopher Ferris
bfb7c761d4 Fix bug in --bionic_cpu option handling.
Make sure that all the variables are properly initialized.

Remove the code that verifies the core to enable using get_schedaffinity
since that make it impossible to change the cpu for different tests.

Change the cpu_to_lock to an int, it really didn't need to be a long.

Fix a few missing tests.

Test: Ran unit tests.
Test: Built the tests and ran on different cpus, verifying that the
Test: chosen cpu was correct.
Test: Created an xml file that had different cpus for different tests
Test: and verified that it locked to each cpu properly.
Change-Id: Ie7b4ad8f306f13d6e968d118e71bb5dc0221552a
2018-05-04 17:34:35 -07:00
Christopher Ferris
4c5fde0e5e Remove workaround for running property tests.
Also fix the tests for some missing benchmarks that have been
added recently.

Test: Ran bionic benchmarks tests and all pass.
Test: Ran bionic benchmarks to verify that there are no crashes.
Change-Id: I8501553e8a229c0c6ea81e894e91ac2f5f2fe26c
2018-01-08 16:13:14 -08:00
Elliott Hughes
3b644e932a Trivial scanf benchmarks.
Bug: http://b/68672236
Test: ran benchmarks
Change-Id: I96514be5e67969b65205e953051c524be3626ec4
2017-12-11 14:46:22 -08:00
Mark Salyzyn
6f9c35ded2 bionic: benchmark: add clock_getres performance tests
Provide a means to check vdso kernel performance for all reasoned
combinations of clock_getres, same set of ids as clock_gettime.

Add to suites/vdso.xml

Test: /data/nativetest{64}/bionic-benchmarks-tests/bionic-benchmarks-tests
      /data/benchmarktest{64}/bionic-benchmarks/bionic-benchmarks \
        --bionic_xml=vdso.xml --benchmark_filter=BM_time_clock_getres*
Bug: 63737556
Change-Id: I11ea200f67aec2a2f6ad9284960f2941298da222
2017-12-07 09:41:31 -08:00
Mark Salyzyn
6ffa10f483 bionic: benchmark: additional clock_gettime performance tests
Provide a means to check vdso kernel performance for each of
CLOCK_MONOTONIC (current), CLOCK_MONOTONIC_COARSE,
CLOCK_MONOTONIC_RAW, CLOCK_REALTIME, CLOCK_REALTIME_COARSE,
CLOCK_BOOTTIME.

Add a suites/vdso.xml to select subset of tests impacted by
vdso implementations.

Test: /data/nativetest{64}/bionic-benchmarks-tests/bionic-benchmarks-tests
      /data/benchmarktest{64}/bionic-benchmarks/bionic-benchmarks \
        --bionic_xml=vdso.xml --benchmark_filter=BM_time_clock_gettime*
Bug: 63737556
Change-Id: Ibc48e838e50929527ce8d221dd1a608bf185cbc2
2017-12-07 09:41:13 -08:00
Christopher Ferris
e2188d460b Add new benchmark options.
Add a bunch of extra options to allow greater flexibility for creating
benchmarks. Add a pattern option that can be used to represent any
one buffer or two buffer possibility. This should fully replace the
functionality of microbench.

Add a single option for one buffer benchmarks and two buffer benchmarks
that represents all of the possible options to run a string benchmark.

Add a string test suite that includes all string benchmarks using the
above option.

Test: New unit tests to cover all the new options, and all pass.
Test: Ran new string test suite with a single bionic iteration.
Change-Id: Idb13ea15e44cec626e9f46672ccd648d7ca72ba6
2017-11-30 15:49:45 -08:00
Christopher Ferris
858e33698d 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
2017-11-30 09:09:41 -08:00
Christopher Ferris
ad05730143 Fix bionic benchmark unit tests.
Test: Ran unit tests.
Change-Id: I729572b101c7011cde5e7da4a72af7ede719b76b
2017-11-07 15:18:33 -08:00
Christopher Ferris
d9d39be0f0 A few small fix ups.
- Add a default xml file to run if nothing is specified on the command-line.
- Add a way to specify a xml file in suites without having to specify the
  full path name.
- Move all of the test xml files into their own directory.
- Add the suites directory for to glibc benchmarks.
- Add a new test for help data.
- Modify the full suite test to verify the default xml is chosen and use
  the real full.xml instead of the test one. Delete the test_full.xml.
- Move the property tests to the end of the suite.
- Add skipping of xml comments.

Test: Ran the unit tests and ran the bionic benchmarks.
Change-Id: Ie99965f86fe915af0175de46c7780ab79e2b0843
2017-08-24 14:50:03 -07:00
Anders Lewis
4b26f71778 Fix local path assumption in interface_test.
Also fix a couple of other issues with the tests.

Test: Unit tests.
Change-Id: I6c2b2b5fad487460441487cc231a0e4a8d3897c7
2017-08-15 11:04:44 -07:00
Anders Lewis
ac4f4b43a3 Add musl benchmarks.
Test: Unit tests.
Change-Id: Ifb2911825f84b95fe64a803bfabd32fb81210eae
2017-08-09 15:26:37 -07:00
Anders Lewis
a7b0f88997 Implement interface for bionic benchmarks.
Test: Unit tests.
Change-Id: Ic61932f61ddd572e2f045b601f9da6e090cdc45d
2017-08-07 13:16:09 -07:00
Anders Lewis
f4447b9105 Support memory alignment tests for string_benchmark.cpp
Test: Manually verify that benchmark times are similar and add a unit test.
Change-Id: Idaaeb4c8c3629f797ffd8d0c86c8d7b7b9653181
2017-07-12 13:42:23 -07:00