1 // 2 // Copyright © 2019 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <client/src/SendCounterPacket.hpp> 9 #include <client/src/SendThread.hpp> 10 #include <client/src/ProfilingUtils.hpp> 11 #include <client/src/IProfilingConnectionFactory.hpp> 12 13 #include <armnn/profiling/ArmNNProfiling.hpp> 14 15 #include <common/include/IgnoreUnused.hpp> 16 #include <common/include/NumericCast.hpp> 17 18 #include <atomic> 19 #include <condition_variable> 20 #include <mutex> 21 #include <thread> 22 23 namespace arm 24 { 25 26 namespace pipe 27 { 28 29 class SendCounterPacketTest : public SendCounterPacket 30 { 31 public: SendCounterPacketTest(IBufferManager & buffer)32 SendCounterPacketTest(IBufferManager& buffer) 33 : SendCounterPacket(buffer, 34 arm::pipe::ARMNN_SOFTWARE_INFO, 35 arm::pipe::ARMNN_SOFTWARE_VERSION, 36 arm::pipe::ARMNN_HARDWARE_VERSION) 37 {} 38 CreateDeviceRecordTest(const DevicePtr & device,DeviceRecord & deviceRecord,std::string & errorMessage)39 bool CreateDeviceRecordTest(const DevicePtr& device, 40 DeviceRecord& deviceRecord, 41 std::string& errorMessage) 42 { 43 return CreateDeviceRecord(device, deviceRecord, errorMessage); 44 } 45 CreateCounterSetRecordTest(const CounterSetPtr & counterSet,CounterSetRecord & counterSetRecord,std::string & errorMessage)46 bool CreateCounterSetRecordTest(const CounterSetPtr& counterSet, 47 CounterSetRecord& counterSetRecord, 48 std::string& errorMessage) 49 { 50 return CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage); 51 } 52 CreateEventRecordTest(const CounterPtr & counter,EventRecord & eventRecord,std::string & errorMessage)53 bool CreateEventRecordTest(const CounterPtr& counter, 54 EventRecord& eventRecord, 55 std::string& errorMessage) 56 { 57 return CreateEventRecord(counter, eventRecord, errorMessage); 58 } 59 CreateCategoryRecordTest(const CategoryPtr & category,const Counters & counters,CategoryRecord & categoryRecord,std::string & errorMessage)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 }; 68 69 } // namespace pipe 70 71 } // namespace arm 72