The primary way to run a performance test locally is to run its
host-side entry point. These entry points are defined in
[src/tests/end_to_end/perf/](https://cs.opensource.google/fuchsia/fuchsia/+/main:/src/tests/end_to_end/perf/). These are
what are used in Fuchsia Infra builds for collecting performance
results for uploading to Chromeperf. Running one of these entry
points involves the following:

- Use the `terminal` product, in order to match what is tested on
  Fuchsia Infra in CI and CQ. Example:

      fx set terminal.x64-reduced-perf-variation --with //bundles/buildbot/terminal
      fx build

- Launch Fuchsia on hardware or on an emulator as usual.

- Run the test's host-side entry point with `fx test --e2e`. Example:

      fx test --e2e --outdir="out/test_out" --timestamp-artifacts fidlc_microbenchmarks_test

  The argument to `fx test` should be your GN target name specified in
  the call to the `fuchsia_component_perf_test` template.

The test will write its results to a newly-created, timestamped
subdirectory of `out/test_out`. This will include
`*.fuchsiaperf.json` files containing the performance results. It may
include other files such as Fuchsia traces.

To produce and compare performance test results before and after a local
change, you can instead use the [perfcompare](https://fuchsia.dev/fuchsia-src/development/performance/perfcompare) tool.

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/development/performance/running_performance_tests.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/development/performance/running_performance_tests.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/development/performance/running_performance_tests.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/development/performance/running_performance_tests.md "Edit the source code of this page")

<br />