tree: 4de87b0cb24b44839aff6e44c35f1ebb5d63a9fc [path history] [tgz]
  1. BUILD.gn
  2. channels.cc
  3. channels.h
  4. events.cc
  5. fifos.cc
  6. filesystem.cc
  7. main_gbenchmark.cc
  8. main_test.cc
  9. mmu.cc
  10. null.cc
  11. ports.cc
  12. processes.cc
  13. pthreads.cc
  14. README.md
  15. round_trip_service.fidl
  16. round_trips.cc
  17. round_trips.h
  18. sockets.cc
  19. syscalls.cc
  20. test_runner.cc
  21. test_runner.h
  22. threads.cc
  23. time_get.cc
  24. vmo.cc
bin/zircon_benchmarks/README.md

Zircon Benchmarks

Microbenchmarks for the Zircon kernel and services.

There are three ways to run zircon_benchmarks:

  • gbenchmark mode: This uses the Google benchmark library (gbenchmark). This is the default.

    For this, run zircon_benchmarks with no arguments, or with arguments accepted by gbenchmark (such as --help).

    By default, this mode is quite slow to run, because gbenchmark uses a high default value for its --benchmark_min_time setting. You can speed up gbenchmark by passing --benchmark_min_time=0.01.

    Note: gbenchmark's use of statistics is not very sophisticated, so this mode might not produce consistent results across runs for some benchmarks. Furthermore, gbenchmark does not output any measures of variability (such as standard deviation). This limits the usefulness of gbenchmark for detecting performance regressions.

  • perftest mode: This mode will record the times taken by each run of the benchmarks, allowing further analysis, which is useful for detecting performance regressions. It also prints some summary statistics. This uses the test runner provided by Zircon's perftest library.

    For this, run zircon_benchmarks -p --out=output.json. The result data will be written to output.json. This uses the JSON output format described in the Benchmarking guide.

    See Zircon's perftest library for details of the other command line options.

    Note: Not all of the benchmarks have been converted so that they will run in this mode. (TODO(TO-651): Convert the remaining tests.) Those that have been converted will run in both fbenchmark mode and gbenchmark mode.

  • Test-only mode: This runs on the bots via runtests, and it just checks that each benchmark still works. It runs quickly -- it runs only a small number of iterations of each benchmark. It does not print any performance information.

    For this, run /system/test/zircon_benchmarks_test.