aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
blob: 33f1135b8729588beaa4c7bdf3fafe29c2ec076c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include "ProfilingStateMachine.hpp"
#include "ProfilingConnectionFactory.hpp"

namespace armnn
{

namespace profiling
{

class ProfilingService
{
public:
    ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options);
    ~ProfilingService() = default;

    void Run();

    ProfilingState GetCurrentState() const;

    // Options are public to allow profiling to be turned on at runtime
    Runtime::CreationOptions::ExternalProfilingOptions m_Options;

private:
    void Initialise();

    ProfilingStateMachine m_State;
    ProfilingConnectionFactory m_Factory;
};

} // namespace profiling

} // namespace armnn