1// Copyright 2017 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#pragma once
6
7#include <stddef.h>
8
9#include <trace/handler.h>
10
11struct BenchmarkSpec {
12    const char* name;
13    trace_buffering_mode_t mode;
14    size_t buffer_size;
15    // The number of iterations is a parameter to make it easier to
16    // experiment and debug.
17    unsigned num_iterations;
18};
19
20// Runs benchmarks which need tracing disabled.
21void RunTracingDisabledBenchmarks();
22
23// Runs benchmarks which need tracing enabled.
24void RunTracingEnabledBenchmarks(const BenchmarkSpec* spec);
25
26// Runs benchmarks with NTRACE macro defined.
27void RunNoTraceBenchmarks();
28