20.11
|
#include "ProfilingTests.hpp"
#include "ProfilingTestUtils.hpp"
#include <backends/BackendProfiling.hpp>
#include <common/include/EncodeVersion.hpp>
#include <common/include/PacketVersionResolver.hpp>
#include <common/include/SwTrace.hpp>
#include <CommandHandler.hpp>
#include <ConnectionAcknowledgedCommandHandler.hpp>
#include <CounterDirectory.hpp>
#include <CounterIdMap.hpp>
#include <Holder.hpp>
#include <ICounterValues.hpp>
#include <PeriodicCounterCapture.hpp>
#include <PeriodicCounterSelectionCommandHandler.hpp>
#include <ProfilingStateMachine.hpp>
#include <ProfilingUtils.hpp>
#include <RegisterBackendCounters.hpp>
#include <RequestCounterDirectoryCommandHandler.hpp>
#include <Runtime.hpp>
#include <SocketProfilingConnection.hpp>
#include <SendCounterPacket.hpp>
#include <SendThread.hpp>
#include <SendTimelinePacket.hpp>
#include <armnn/Conversion.hpp>
#include <armnn/Types.hpp>
#include <armnn/Utils.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
#include <armnn/utility/NumericCast.hpp>
#include <common/include/CommandHandlerKey.hpp>
#include <common/include/CommandHandlerRegistry.hpp>
#include <common/include/SocketConnectionException.hpp>
#include <common/include/Packet.hpp>
#include <cstdint>
#include <cstring>
#include <iostream>
#include <limits>
#include <map>
#include <random>
Go to the source code of this file.
Typedefs | |
using | PacketType = MockProfilingConnection::PacketType |
Functions | |
BOOST_AUTO_TEST_CASE (CheckCommandHandlerKeyComparisons) | |
BOOST_AUTO_TEST_CASE (CheckPacketKeyComparisons) | |
BOOST_AUTO_TEST_CASE (CheckCommandHandler) | |
BOOST_AUTO_TEST_CASE (CheckEncodeVersion) | |
BOOST_AUTO_TEST_CASE (CheckPacketClass) | |
BOOST_AUTO_TEST_CASE (CheckCommandHandlerFunctor) | |
BOOST_AUTO_TEST_CASE (CheckCommandHandlerRegistry) | |
BOOST_AUTO_TEST_CASE (CheckPacketVersionResolver) | |
void | ProfilingCurrentStateThreadImpl (ProfilingStateMachine &states) |
BOOST_AUTO_TEST_CASE (CheckProfilingStateMachine) | |
void | CaptureDataWriteThreadImpl (Holder &holder, uint32_t capturePeriod, const std::vector< uint16_t > &counterIds) |
void | CaptureDataReadThreadImpl (const Holder &holder, CaptureData &captureData) |
BOOST_AUTO_TEST_CASE (CheckCaptureDataHolder) | |
BOOST_AUTO_TEST_CASE (CaptureDataMethods) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceDisabled) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceCounterDirectory) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceCounterValues) | |
BOOST_AUTO_TEST_CASE (CheckProfilingObjectUids) | |
BOOST_AUTO_TEST_CASE (CheckCounterDirectoryRegisterCategory) | |
BOOST_AUTO_TEST_CASE (CheckCounterDirectoryRegisterDevice) | |
BOOST_AUTO_TEST_CASE (CheckCounterDirectoryRegisterCounterSet) | |
BOOST_AUTO_TEST_CASE (CheckCounterDirectoryRegisterCounter) | |
BOOST_AUTO_TEST_CASE (CounterSelectionCommandHandlerParseData) | |
BOOST_AUTO_TEST_CASE (CheckTimelineActivationAndDeactivation) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceNotActive) | |
BOOST_AUTO_TEST_CASE (CheckConnectionAcknowledged) | |
BOOST_AUTO_TEST_CASE (CheckSocketConnectionException) | |
BOOST_AUTO_TEST_CASE (CheckSocketConnectionException2) | |
BOOST_AUTO_TEST_CASE (SwTraceIsValidCharTest) | |
BOOST_AUTO_TEST_CASE (SwTraceIsValidNameCharTest) | |
BOOST_AUTO_TEST_CASE (IsValidSwTraceStringTest) | |
BOOST_AUTO_TEST_CASE (IsValidSwTraceNameStringTest) | |
template<typename SwTracePolicy > | |
void | StringToSwTraceStringTestHelper (const std::string &testString, std::vector< uint32_t > buffer, size_t expectedSize) |
BOOST_AUTO_TEST_CASE (StringToSwTraceStringTest) | |
BOOST_AUTO_TEST_CASE (StringToSwTraceNameStringTest) | |
BOOST_AUTO_TEST_CASE (CheckPeriodicCounterCaptureThread) | |
BOOST_AUTO_TEST_CASE (RequestCounterDirectoryCommandHandlerTest1) | |
BOOST_AUTO_TEST_CASE (RequestCounterDirectoryCommandHandlerTest2) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodConnectionAcknowledgedPacket) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodRequestCounterDirectoryPacket) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceBadPeriodicCounterSelectionPacketInvalidCounterUid) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodPeriodicCounterSelectionPacketNoCounters) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodPeriodicCounterSelectionPacketSingleCounter) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodPeriodicCounterSelectionPacketMultipleCounters) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceDisconnect) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceGoodPerJobCounterSelectionPacket) | |
BOOST_AUTO_TEST_CASE (CheckConfigureProfilingServiceOn) | |
BOOST_AUTO_TEST_CASE (CheckConfigureProfilingServiceOff) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceEnabled) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceEnabledRuntime) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceBadConnectionAcknowledgedPacket) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceBadRequestCounterDirectoryPacket) | |
BOOST_AUTO_TEST_CASE (CheckProfilingServiceBadPeriodicCounterSelectionPacket) | |
BOOST_AUTO_TEST_CASE (CheckCounterIdMap) | |
BOOST_AUTO_TEST_CASE (CheckRegisterBackendCounters) | |
BOOST_AUTO_TEST_CASE (CheckCounterStatusQuery) | |
BOOST_AUTO_TEST_CASE (CheckRegisterCounters) | |
BOOST_AUTO_TEST_CASE (CheckFileFormat) | |
Definition at line 52 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerKeyComparisons | ) |
Definition at line 56 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPacketKeyComparisons | ) |
Definition at line 109 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandler | ) |
Definition at line 134 of file ProfilingTests.cpp.
References armnn::profiling::Active, ProfilingStateMachine::GetCurrentState(), CommandHandler::IsRunning(), armnn::profiling::NotConnected, TestProfilingConnectionTimeoutError::ReadCalledCount(), CommandHandler::SetStopAfterTimeout(), CommandHandler::Start(), CommandHandler::Stop(), ProfilingStateMachine::TransitionToState(), and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckEncodeVersion | ) |
Definition at line 264 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPacketClass | ) |
Definition at line 294 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerFunctor | ) |
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerRegistry | ) |
Definition at line 390 of file ProfilingTests.cpp.
References TestFunctorA::GetCount().
BOOST_AUTO_TEST_CASE | ( | CheckPacketVersionResolver | ) |
Definition at line 442 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingStateMachine | ) |
Definition at line 474 of file ProfilingTests.cpp.
References armnn::profiling::Active, ProfilingStateMachine::GetCurrentState(), armnn::profiling::NotConnected, ProfilingCurrentStateThreadImpl(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckCaptureDataHolder | ) |
Definition at line 560 of file ProfilingTests.cpp.
References CaptureDataReadThreadImpl(), CaptureDataWriteThreadImpl(), Holder::GetCaptureData(), CaptureData::GetCapturePeriod(), and CaptureData::GetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CaptureDataMethods | ) |
Definition at line 630 of file ProfilingTests.cpp.
References CaptureData::GetCapturePeriod(), CaptureData::GetCounterIds(), CaptureData::SetCapturePeriod(), and CaptureData::SetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceDisabled | ) |
Definition at line 656 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterDirectory | ) |
Definition at line 666 of file ProfilingTests.cpp.
References ICounterDirectory::GetCounterCount(), ProfilingService::GetCounterDirectory(), ProfilingService::ResetExternalProfilingOptions(), and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterValues | ) |
Definition at line 689 of file ProfilingTests.cpp.
References ProfilingService::AddCounterValue(), ProfilingService::GetAbsoluteCounterValue(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetDeltaCounterValue(), ProfilingService::IncrementCounterValue(), ProfilingService::ResetExternalProfilingOptions(), ProfilingService::SetCounterValue(), ProfilingService::SubtractCounterValue(), and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingObjectUids | ) |
Definition at line 798 of file ProfilingTests.cpp.
References armnn::profiling::GetNextCounterUids(), and armnn::profiling::GetNextUid().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCategory | ) |
Definition at line 830 of file ProfilingTests.cpp.
References CounterDirectory::GetCategory(), CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), Device::m_Cores, CounterSet::m_Count, Category::m_Counters, Category::m_Name, Device::m_Name, CounterSet::m_Name, Device::m_Uid, CounterSet::m_Uid, CounterDirectory::RegisterCategory(), CounterDirectory::RegisterCounterSet(), and CounterDirectory::RegisterDevice().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterDevice | ) |
Definition at line 953 of file ProfilingTests.cpp.
References CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDevice(), CounterDirectory::GetDeviceCount(), Device::m_Cores, Category::m_Counters, Category::m_Name, Device::m_Name, Device::m_Uid, CounterDirectory::RegisterCategory(), and CounterDirectory::RegisterDevice().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCounterSet | ) |
Definition at line 1057 of file ProfilingTests.cpp.
References CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSet(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), CounterSet::m_Count, Category::m_Counters, Category::m_Name, CounterSet::m_Name, CounterSet::m_Uid, CounterDirectory::RegisterCategory(), and CounterDirectory::RegisterCounterSet().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCounter | ) |
Definition at line 1176 of file ProfilingTests.cpp.
References CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounter(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), Counter::m_Class, Device::m_Cores, CounterSet::m_Count, Category::m_Counters, Counter::m_CounterSetUid, Counter::m_Description, Counter::m_DeviceUid, Counter::m_Interpolation, Counter::m_MaxCounterUid, Counter::m_Multiplier, Category::m_Name, Device::m_Name, CounterSet::m_Name, Counter::m_Name, Device::m_Uid, CounterSet::m_Uid, Counter::m_Uid, Counter::m_Units, CounterDirectory::RegisterCategory(), CounterDirectory::RegisterCounter(), CounterDirectory::RegisterCounterSet(), and CounterDirectory::RegisterDevice().
BOOST_AUTO_TEST_CASE | ( | CounterSelectionCommandHandlerParseData | ) |
Definition at line 1750 of file ProfilingTests.cpp.
References armnn::profiling::Active, Holder::GetCaptureData(), CaptureData::GetCapturePeriod(), CaptureData::GetCounterIds(), MockBufferManager::GetReadableBuffer(), armnn::IgnoreUnused(), armnn::LOWEST_CAPTURE_PERIOD, MockBufferManager::MarkRead(), armnn::profiling::NotConnected, armnn::numeric_cast(), armnn::profiling::ReadUint16(), armnn::profiling::ReadUint32(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, armnn::profiling::WaitingForAck, armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckTimelineActivationAndDeactivation | ) |
Definition at line 1896 of file ProfilingTests.cpp.
References armnn::profiling::Active, armnn::profiling::ConstructHeader(), armnn::profiling::NotConnected, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceNotActive | ) |
Definition at line 2000 of file ProfilingTests.cpp.
References armnn::profiling::Active, ProfilingServiceRuntimeHelper::ForceTransitionToState(), ProfilingServiceRuntimeHelper::GetProfilingBufferManager(), armnn::GetProfilingService(), BufferManager::GetReadableBuffer(), IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_ProfilingOptions, armnn::profiling::NotConnected, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckConnectionAcknowledged | ) |
Definition at line 2022 of file ProfilingTests.cpp.
References armnn::profiling::Active, ProfilingStateMachine::GetCurrentState(), armnn::profiling::NotConnected, armnn::numeric_cast(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, armnn::profiling::WaitingForAck, armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckSocketConnectionException | ) |
Definition at line 2099 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckSocketConnectionException2 | ) |
Definition at line 2105 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidCharTest | ) |
Definition at line 2120 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidNameCharTest | ) |
Definition at line 2135 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceStringTest | ) |
Definition at line 2173 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceNameStringTest | ) |
Definition at line 2192 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceStringTest | ) |
Definition at line 2234 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceNameStringTest | ) |
Definition at line 2258 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPeriodicCounterCaptureThread | ) |
Definition at line 2286 of file ProfilingTests.cpp.
References MockBufferManager::GetReadableBuffer(), armnn::IgnoreUnused(), armnn::profiling::ReadUint16(), armnn::profiling::ReadUint32(), Holder::SetCaptureData(), PeriodicCounterCapture::Start(), and PeriodicCounterCapture::Stop().
BOOST_AUTO_TEST_CASE | ( | RequestCounterDirectoryCommandHandlerTest1 | ) |
Definition at line 2403 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockBufferManager::GetReadableBuffer(), armnn::profiling::NotConnected, armnn::numeric_cast(), armnn::profiling::ReadUint32(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | RequestCounterDirectoryCommandHandlerTest2 | ) |
Definition at line 2463 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockBufferManager::GetReadableBuffer(), armnn::profiling::NotConnected, armnn::profiling::ReadUint32(), CounterDirectory::RegisterCategory(), CounterDirectory::RegisterCounter(), CounterDirectory::RegisterCounterSet(), CounterDirectory::RegisterDevice(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodConnectionAcknowledgedPacket | ) |
Definition at line 2546 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockProfilingConnection::Clear(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), GetStreamMetaDataPacketSize(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodRequestCounterDirectoryPacket | ) |
Definition at line 2608 of file ProfilingTests.cpp.
References armnn::profiling::Active, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadPeriodicCounterSelectionPacketInvalidCounterUid | ) |
Definition at line 2666 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockProfilingConnection::Clear(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, MockProfilingConnection::WritePacket(), armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPeriodicCounterSelectionPacketNoCounters | ) |
Definition at line 2745 of file ProfilingTests.cpp.
References armnn::profiling::Active, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPeriodicCounterSelectionPacketSingleCounter | ) |
Definition at line 2810 of file ProfilingTests.cpp.
References armnn::profiling::Active, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, MockProfilingConnection::WritePacket(), armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPeriodicCounterSelectionPacketMultipleCounters | ) |
Definition at line 2887 of file ProfilingTests.cpp.
References armnn::profiling::Active, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, MockProfilingConnection::WritePacket(), armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceDisconnect | ) |
Definition at line 2966 of file ProfilingTests.cpp.
References armnn::profiling::Active, ProfilingService::Disconnect(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), MockProfilingConnection::IsOpen(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPerJobCounterSelectionPacket | ) |
Definition at line 3024 of file ProfilingTests.cpp.
References armnn::profiling::Active, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), MockProfilingConnection::GetWrittenDataSize(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckConfigureProfilingServiceOn | ) |
Definition at line 3092 of file ProfilingTests.cpp.
References ProfilingService::ConfigureProfilingService(), ProfilingService::GetCurrentState(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), and armnn::profiling::Uninitialised.
BOOST_AUTO_TEST_CASE | ( | CheckConfigureProfilingServiceOff | ) |
Definition at line 3106 of file ProfilingTests.cpp.
References ProfilingService::ConfigureProfilingService(), ProfilingService::GetCurrentState(), ProfilingService::ResetExternalProfilingOptions(), and armnn::profiling::Uninitialised.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceEnabled | ) |
Definition at line 3119 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceEnabledRuntime | ) |
Definition at line 3150 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadConnectionAcknowledgedPacket | ) |
Definition at line 3185 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, armnn::Warning, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadRequestCounterDirectoryPacket | ) |
Definition at line 3248 of file ProfilingTests.cpp.
References SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadPeriodicCounterSelectionPacket | ) |
Definition at line 3312 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, armnn::Warning, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckCounterIdMap | ) |
Definition at line 3377 of file ProfilingTests.cpp.
References armnn::CpuAcc, armnn::CpuRef, CounterIdMap::GetBackendId(), CounterIdMap::GetGlobalId(), and CounterIdMap::RegisterMapping().
BOOST_AUTO_TEST_CASE | ( | CheckRegisterBackendCounters | ) |
Definition at line 3417 of file ProfilingTests.cpp.
References armnn::CpuRef, ICounterMappings::GetBackendId(), ICounterDirectory::GetCategories(), ICounterDirectory::GetCategory(), ProfilingService::GetCounterDirectory(), ProfilingService::GetCounterMappings(), ICounterDirectory::GetCounterSet(), ICounterDirectory::GetCounterSets(), ICounterDirectory::GetDevice(), ICounterDirectory::GetDevices(), ICounterMappings::GetGlobalId(), RegisterBackendCounters::RegisterCategory(), RegisterBackendCounters::RegisterCounter(), RegisterBackendCounters::RegisterCounterSet(), RegisterBackendCounters::RegisterDevice(), and ProfilingService::ResetExternalProfilingOptions().
BOOST_AUTO_TEST_CASE | ( | CheckCounterStatusQuery | ) |
Definition at line 3468 of file ProfilingTests.cpp.
References armnn::CpuAcc, armnn::CpuRef, BackendProfiling::GetActiveCounters(), ICounterMappings::GetBackendId(), ICounterDirectory::GetCategories(), ICounterDirectory::GetCategory(), ProfilingService::GetCounterDirectory(), ProfilingService::GetCounterMappings(), BackendProfiling::GetCounterStatus(), ICounterMappings::GetGlobalId(), CounterStatus::m_BackendCounterId, CounterStatus::m_Enabled, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, CounterStatus::m_GlobalCounterId, IRuntime::CreationOptions::m_ProfilingOptions, CounterStatus::m_SamplingRateInMicroseconds, RegisterBackendCounters::RegisterCategory(), RegisterBackendCounters::RegisterCounter(), ProfilingService::ResetExternalProfilingOptions(), and ProfilingService::SetCaptureData().
BOOST_AUTO_TEST_CASE | ( | CheckRegisterCounters | ) |
Definition at line 3605 of file ProfilingTests.cpp.
References Timestamp::counterValues, armnn::CpuRef, MockBufferManager::GetReadableBuffer(), IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_ProfilingOptions, armnn::profiling::ReadUint16(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), MockProfilingService::RegisterMapping(), BackendProfiling::ReportCounters(), and Timestamp::timestamp.
BOOST_AUTO_TEST_CASE | ( | CheckFileFormat | ) |
Definition at line 3664 of file ProfilingTests.cpp.
References BOOST_AUTO_TEST_SUITE_END(), ProfilingService::GetCurrentState(), armnn::profiling::NotConnected, ProfilingService::ResetExternalProfilingOptions(), ProfilingService::Update(), and armnn::Warning.
void CaptureDataReadThreadImpl | ( | const Holder & | holder, |
CaptureData & | captureData | ||
) |
Definition at line 555 of file ProfilingTests.cpp.
References Holder::GetCaptureData().
Referenced by BOOST_AUTO_TEST_CASE().
void CaptureDataWriteThreadImpl | ( | Holder & | holder, |
uint32_t | capturePeriod, | ||
const std::vector< uint16_t > & | counterIds | ||
) |
Definition at line 550 of file ProfilingTests.cpp.
References Holder::SetCaptureData().
Referenced by BOOST_AUTO_TEST_CASE().
void ProfilingCurrentStateThreadImpl | ( | ProfilingStateMachine & | states | ) |
Definition at line 467 of file ProfilingTests.cpp.
References ProfilingStateMachine::GetCurrentState(), armnn::profiling::NotConnected, and ProfilingStateMachine::TransitionToState().
Referenced by BOOST_AUTO_TEST_CASE().
void StringToSwTraceStringTestHelper | ( | const std::string & | testString, |
std::vector< uint32_t > | buffer, | ||
size_t | expectedSize | ||
) |
Definition at line 2212 of file ProfilingTests.cpp.