blob: 50cd50e5c3e12013408cc3d26c5e261f726bf1e8 [file] [log] [blame]
Jim Flynn4c9ed1d2022-01-23 23:57:20 +00001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include <armnn/profiling/ILocalPacketHandler.hpp>
9
10#include <string>
11#include <vector>
12
13namespace arm
14{
15namespace pipe
16{
17/// The lowest performance data capture interval we support is 10 miliseconds.
18constexpr unsigned int LOWEST_CAPTURE_PERIOD = 10000u;
19} // namespace pipe
20} // namespace arm
21
22namespace armnn
23{
24
25namespace profiling
26{
27
28struct ProfilingOptions {
29 ProfilingOptions()
30 : m_EnableProfiling(false), m_TimelineEnabled(false), m_OutgoingCaptureFile(""),
31 m_IncomingCaptureFile(""), m_FileOnly(false), m_CapturePeriod(arm::pipe::LOWEST_CAPTURE_PERIOD),
32 m_FileFormat("binary"), m_LocalPacketHandlers() {}
33
34 /// Indicates whether external profiling is enabled or not.
35 bool m_EnableProfiling;
36 /// Indicates whether external timeline profiling is enabled or not.
37 bool m_TimelineEnabled;
38 /// Path to a file in which outgoing timeline profiling messages will be stored.
39 std::string m_OutgoingCaptureFile;
40 /// Path to a file in which incoming timeline profiling messages will be stored.
41 std::string m_IncomingCaptureFile;
42 /// Enable profiling output to file only.
43 bool m_FileOnly;
44 /// The duration at which captured profiling messages will be flushed.
45 uint32_t m_CapturePeriod;
46 /// The format of the file used for outputting profiling data.
47 std::string m_FileFormat;
48 std::vector <armnn::profiling::ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
49};
50
51} // namespace profiling
52
53} // namespace armnn