blob: 1985bc802c6e8fd37e5b1fea3597cfa2c100c2e2 [file] [log] [blame]
Ferran Balaguer1b941722019-08-28 16:57:18 +01001//
Jim Flynn83d08a92020-07-09 13:48:16 +01002// Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
Ferran Balaguer1b941722019-08-28 16:57:18 +01003// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Jim Flynn3e9bc192022-03-23 23:01:26 +00008#include <client/src/SendCounterPacket.hpp>
9#include <client/src/SendThread.hpp>
10#include <client/src/ProfilingUtils.hpp>
11#include <client/src/IProfilingConnectionFactory.hpp>
Ferran Balaguer1b941722019-08-28 16:57:18 +010012
Jim Flynn9c85b412022-03-16 00:27:43 +000013#include <armnn/profiling/ArmNNProfiling.hpp>
14
Jim Flynn9265a882022-03-10 23:35:26 +000015#include <common/include/IgnoreUnused.hpp>
16#include <common/include/NumericCast.hpp>
Jim Flynnf9db3ef2022-03-08 21:23:44 +000017
Sadik Armagan3896b472020-02-10 12:24:15 +000018#include <atomic>
19#include <condition_variable>
20#include <mutex>
21#include <thread>
22
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000023namespace arm
Matteo Martincigh24e8f922019-09-19 11:57:46 +010024{
Ferran Balaguer1b941722019-08-28 16:57:18 +010025
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000026namespace pipe
Matteo Martincigh24e8f922019-09-19 11:57:46 +010027{
Matteo Martincighd0613b52019-10-09 16:47:04 +010028
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010029class SendCounterPacketTest : public SendCounterPacket
30{
31public:
Sadik Armagan3896b472020-02-10 12:24:15 +000032 SendCounterPacketTest(IBufferManager& buffer)
Jim Flynn9c85b412022-03-16 00:27:43 +000033 : SendCounterPacket(buffer,
34 arm::pipe::ARMNN_SOFTWARE_INFO,
35 arm::pipe::ARMNN_SOFTWARE_VERSION,
36 arm::pipe::ARMNN_HARDWARE_VERSION)
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010037 {}
38
39 bool CreateDeviceRecordTest(const DevicePtr& device,
40 DeviceRecord& deviceRecord,
41 std::string& errorMessage)
42 {
43 return CreateDeviceRecord(device, deviceRecord, errorMessage);
44 }
45
46 bool CreateCounterSetRecordTest(const CounterSetPtr& counterSet,
47 CounterSetRecord& counterSetRecord,
48 std::string& errorMessage)
49 {
50 return CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage);
51 }
52
53 bool CreateEventRecordTest(const CounterPtr& counter,
54 EventRecord& eventRecord,
55 std::string& errorMessage)
56 {
57 return CreateEventRecord(counter, eventRecord, errorMessage);
58 }
59
60 bool CreateCategoryRecordTest(const CategoryPtr& category,
61 const Counters& counters,
62 CategoryRecord& categoryRecord,
63 std::string& errorMessage)
64 {
65 return CreateCategoryRecord(category, counters, categoryRecord, errorMessage);
66 }
67};
Matteo Martincigh24e8f922019-09-19 11:57:46 +010068
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000069} // namespace pipe
Matteo Martincigh24e8f922019-09-19 11:57:46 +010070
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000071} // namespace arm