20.08
|
#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 <common/include/CommandHandlerKey.hpp>
#include <common/include/CommandHandlerRegistry.hpp>
#include <common/include/SocketConnectionException.hpp>
#include <common/include/Packet.hpp>
#include <boost/numeric/conversion/cast.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 53 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerKeyComparisons | ) |
Definition at line 57 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPacketKeyComparisons | ) |
Definition at line 110 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandler | ) |
Definition at line 135 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 265 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPacketClass | ) |
Definition at line 295 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerFunctor | ) |
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerRegistry | ) |
Definition at line 391 of file ProfilingTests.cpp.
References TestFunctorA::GetCount().
BOOST_AUTO_TEST_CASE | ( | CheckPacketVersionResolver | ) |
Definition at line 443 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingStateMachine | ) |
Definition at line 475 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 561 of file ProfilingTests.cpp.
References CaptureDataReadThreadImpl(), CaptureDataWriteThreadImpl(), Holder::GetCaptureData(), CaptureData::GetCapturePeriod(), and CaptureData::GetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CaptureDataMethods | ) |
Definition at line 631 of file ProfilingTests.cpp.
References CaptureData::GetCapturePeriod(), CaptureData::GetCounterIds(), CaptureData::SetCapturePeriod(), and CaptureData::SetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceDisabled | ) |
Definition at line 657 of file ProfilingTests.cpp.
References ProfilingService::GetCurrentState(), ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterDirectory | ) |
Definition at line 667 of file ProfilingTests.cpp.
References ICounterDirectory::GetCounterCount(), ProfilingService::GetCounterDirectory(), ProfilingService::ResetExternalProfilingOptions(), and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterValues | ) |
Definition at line 690 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 799 of file ProfilingTests.cpp.
References armnn::profiling::GetNextCounterUids(), and armnn::profiling::GetNextUid().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCategory | ) |
Definition at line 831 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 954 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 1058 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 1177 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 1751 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 1899 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 2003 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 2025 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 2104 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckSocketConnectionException2 | ) |
Definition at line 2110 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidCharTest | ) |
Definition at line 2125 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidNameCharTest | ) |
Definition at line 2140 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceStringTest | ) |
Definition at line 2178 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceNameStringTest | ) |
Definition at line 2197 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceStringTest | ) |
Definition at line 2239 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceNameStringTest | ) |
Definition at line 2263 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckPeriodicCounterCaptureThread | ) |
Definition at line 2291 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 2408 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 2470 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockBufferManager::GetReadableBuffer(), armnn::profiling::NotConnected, armnn::numeric_cast(), 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 2555 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 2617 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 2675 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 2754 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 2819 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 2896 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 2975 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 3033 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 3101 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 3115 of file ProfilingTests.cpp.
References ProfilingService::ConfigureProfilingService(), ProfilingService::GetCurrentState(), ProfilingService::ResetExternalProfilingOptions(), and armnn::profiling::Uninitialised.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceEnabled | ) |
Definition at line 3128 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 3159 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 3194 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 3257 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 3321 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 3386 of file ProfilingTests.cpp.
References armnn::CpuAcc, armnn::CpuRef, CounterIdMap::GetBackendId(), CounterIdMap::GetGlobalId(), and CounterIdMap::RegisterMapping().
BOOST_AUTO_TEST_CASE | ( | CheckRegisterBackendCounters | ) |
Definition at line 3426 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 3477 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 3614 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 3673 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 556 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 551 of file ProfilingTests.cpp.
References Holder::SetCaptureData().
Referenced by BOOST_AUTO_TEST_CASE().
void ProfilingCurrentStateThreadImpl | ( | ProfilingStateMachine & | states | ) |
Definition at line 468 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 2217 of file ProfilingTests.cpp.