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