Keith Davis | 02356de | 2019-08-26 18:28:17 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "ProfilingStateMachine.hpp" |
| 9 | #include "ProfilingConnectionFactory.hpp" |
| 10 | |
| 11 | namespace armnn |
| 12 | { |
| 13 | |
| 14 | namespace profiling |
| 15 | { |
| 16 | |
| 17 | class ProfilingService |
| 18 | { |
| 19 | public: |
| 20 | ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options); |
| 21 | ~ProfilingService() = default; |
| 22 | |
| 23 | void Run(); |
| 24 | |
| 25 | ProfilingState GetCurrentState() const; |
| 26 | |
| 27 | // Options are public to allow profiling to be turned on at runtime |
| 28 | Runtime::CreationOptions::ExternalProfilingOptions m_Options; |
| 29 | |
| 30 | private: |
| 31 | void Initialise(); |
| 32 | |
| 33 | ProfilingStateMachine m_State; |
| 34 | ProfilingConnectionFactory m_Factory; |
| 35 | }; |
| 36 | |
| 37 | } // namespace profiling |
| 38 | |
| 39 | } // namespace armnn |