tree: 454bfe2dc4017d6cf2e59fc2ead4ad23fbe86262 [path history] [tgz]
  1. meta/
  2. assert.h
  3. async_loop.cc
  4. async_loop.fidl
  5. atomics.cc
  6. BUILD.gn
  7. channels.cc
  8. clock.cc
  9. clock_posix.cc
  10. context_switch_overhead.cc
  11. context_switch_overhead_helper.cc
  12. events.cc
  13. example.cc
  14. fdio_spawn.cc
  15. fifos.cc
  16. filesystem.cc
  17. get_info.cc
  18. get_info_helper.cc
  19. getpid.cc
  20. handle.cc
  21. handle_creation.cc
  22. inspect.cc
  23. lazy_dir.cc
  24. main.cc
  25. main.h
  26. malloc.cc
  27. mem_alloc.cc
  28. memcpy.cc
  29. mmu.cc
  30. mutex.cc
  31. no_op_executable.cc
  32. null.cc
  33. object_wait.cc
  34. OWNERS
  35. ports.cc
  36. prng.cc
  37. process_spawn_posix.cc
  38. pseudo_dir.cc
  39. pthreads.cc
  40. random_memcpy.cc
  41. README.md
  42. round_tripper.fidl
  43. round_trips.cc
  44. round_trips.h
  45. round_trips_futex.cc
  46. round_trips_posix.cc
  47. sleep.cc
  48. sockets.cc
  49. streams.cc
  50. syscalls.cc
  51. test_runner.h
  52. threads.cc
  53. timer.cc
  54. tracing.cc
  55. util.cc
  56. util.h
  57. vmar.cc
  58. vmo.cc
src/tests/microbenchmarks/README.md

Fuchsia Microbenchmarks

This set of tests includes microbenchmarks for core OS functionality, including Zircon syscalls and IPC primitives, as well as microbenchmarks for other layers of Fuchsia.

Some of the microbenchmarks are portable and can be run on Linux or Mac, for comparison against Fuchsia. This means that the name fuchsia_microbenchmarks should be taken to mean “microbenchmarks that are part of the Fuchsia project” rather than “microbenchmarks that only run on Fuchsia”.

This used to be called “zircon_benchmarks”, but it was renamed to reflect that it covers more than just Zircon.

Writing Benchmarks

This uses Zircon's perftest library.

Running Benchmarks

There are two ways to run fuchsia_microbenchmarks:

  • 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 fuchsia_microbenchmarks -p --out=output.json. The result data will be written to output.json using our perf test result schema.

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

  • 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 run-test-component fuchsia-pkg://fuchsia.com/fuchsia_microbenchmarks#meta/fuchsia_microbenchmarks.cmx.