[roll] Roll fuchsia [audio_core] Add an output pipeline benchmark
This CL adds a new command line tool that constructs an OutputPipline
from a given audio_core_config.json file. It then benchmarks
OutputPipeline::ReadLock against a set of input streams. This program
will be used to verify that out-of-process effects (fxbug.dev/80067) do
not slow down our production audio pipelines by a significant amount.
The program ships with a default set of configurations:
empty (no inputs)
M/VC (one MEDIA input, constant volume)
C/VC (one COMMUNICATION input, constant volume)
U/VC (one ULTRASOUND input, constant volume)
MCU/VC (one of each of the above inputs, constant volume)
MCU/VS (one of each of the above inputs, stepped volume)
MCU/VR (one of each of the above inputs, ramped volume)
The inputs are sine waves. For audible inputs, we use a 1kHz wave
sampled at 48kHz with 1 channel. For ultrasonic inputs, we use a 32kHz
wave sampled at 96kHz with 1 channel. These inputs are currently not
configurable. However, the set of usages is configurable. For example,
`--scenarios=MMI,U` benchmarks a scenario with 2 MEDIA inputs and 1
INTERRUPTION input, plus a second scenario with 1 ULTRASOUND input.
The tool is designed to run against an arbitrary audio_core_config.json.
To support this, we define the BUILD rules within a template which must
be instantiated for each audio_core_config.json. For now, this template
is instantiated just once, with an empty pipeline. A future CL will
instantiate this template with our production pipelines.
Below is the output from the tool when run on an empty output pipeline
on a sherlock device.
$ fx shell run fuchsia-pkg://fuchsia.com/audio-pipeline-benchmark-empty-pipeline#meta/audio-pipeline-benchmark-empty-pipeline.cmx
Audio output pipeline profiling tool
Elapsed time in microseconds for a single 10.00ms mix job
for mixer configuration X/VV where X is a list of input
streams, each of which has one of the following usages:
B: BACKGROUND
M: MEDIA
I: INTERRUPTION
S: SYSTEM_AGENT
C: COMMUNICATION
U: ULTRASOUND
and VV is a volume setting:
VM: muted volume
VC: constant volume
VS: discrete volume change just before each mix job ("stepped")
VR: ramped volume change just before each mix job
Config Mean Median Best Worst Iterations
empty 41.583 42.500 15.333 49.083 20
M/VC 346.366 343.208 329.417 396.250 20
C/VC 341.612 337.083 328.125 402.042 20
U/VC 84.772 82.208 72.042 105.541 20
MCU/VM 113.502 108.666 90.542 210.959 20
WARNING: 20 of 20 runs produced no output
MCU/VC 643.995 635.854 625.792 782.125 20
MCU/VS 620.089 614.312 596.167 712.708 20
MCU/VR 991.877 1007.062 813.375 1049.208 20
Original-Bug: 80067
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/574060
Original-Revision: 57c950c09b70bdebed6838259e3d77edf3d564bb
GitOrigin-RevId: 6d6b00a3acaddaa0f527909f10064aa30f86a71b
Change-Id: I646959240961460f23903be2b9410ec01ccf94e1
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.