ArmNN
NotReleased
|
#include "ProfilingTests.hpp"
#include <backends/BackendProfiling.hpp>
#include <CommandHandler.hpp>
#include <CommandHandlerKey.hpp>
#include <CommandHandlerRegistry.hpp>
#include <ConnectionAcknowledgedCommandHandler.hpp>
#include <CounterDirectory.hpp>
#include <CounterIdMap.hpp>
#include <EncodeVersion.hpp>
#include <Holder.hpp>
#include <ICounterValues.hpp>
#include <Packet.hpp>
#include <PacketVersionResolver.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 <boost/algorithm/string.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 (CheckConnectionAcknowledged) | |
BOOST_AUTO_TEST_CASE (CheckSocketProfilingConnection) | |
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) | |
Definition at line 49 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerKeyComparisons | ) |
Definition at line 53 of file ProfilingTests.cpp.
References BOOST_CHECK(), CommandHandlerKey::GetPacketId(), and CommandHandlerKey::GetVersion().
BOOST_AUTO_TEST_CASE | ( | CheckPacketKeyComparisons | ) |
Definition at line 104 of file ProfilingTests.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandler | ) |
Definition at line 129 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), ProfilingStateMachine::GetCurrentState(), CommandHandler::IsRunning(), armnn::profiling::NotConnected, TestProfilingConnectionTimeoutError::ReadCalledCount(), CommandHandlerRegistry::RegisterFunctor(), CommandHandler::SetStopAfterTimeout(), CommandHandler::Start(), CommandHandler::Stop(), ProfilingStateMachine::TransitionToState(), and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckEncodeVersion | ) |
Definition at line 257 of file ProfilingTests.cpp.
References BOOST_CHECK(), Version::GetMajor(), Version::GetMinor(), and Version::GetPatch().
BOOST_AUTO_TEST_CASE | ( | CheckPacketClass | ) |
Definition at line 287 of file ProfilingTests.cpp.
References BOOST_CHECK(), Packet::GetData(), Packet::GetHeader(), Packet::GetLength(), Packet::GetPacketClass(), Packet::GetPacketFamily(), Packet::GetPacketId(), and Packet::GetPacketType().
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerFunctor | ) |
Definition at line 324 of file ProfilingTests.cpp.
References BOOST_CHECK(), TestFunctorA::GetCount(), CommandHandlerFunctor::GetFamilyId(), Packet::GetPacketFamily(), CommandHandlerFunctor::GetPacketId(), Packet::GetPacketId(), and CommandHandlerFunctor::GetVersion().
BOOST_AUTO_TEST_CASE | ( | CheckCommandHandlerRegistry | ) |
Definition at line 377 of file ProfilingTests.cpp.
References BOOST_CHECK(), TestFunctorA::GetCount(), CommandHandlerFunctor::GetFamilyId(), CommandHandlerRegistry::GetFunctor(), Packet::GetPacketFamily(), CommandHandlerFunctor::GetPacketId(), Packet::GetPacketId(), and CommandHandlerRegistry::RegisterFunctor().
BOOST_AUTO_TEST_CASE | ( | CheckPacketVersionResolver | ) |
Definition at line 429 of file ProfilingTests.cpp.
References PacketVersionResolver::ResolvePacketVersion().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingStateMachine | ) |
Definition at line 461 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), ProfilingStateMachine::GetCurrentState(), armnn::profiling::NotConnected, ProfilingCurrentStateThreadImpl(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckCaptureDataHolder | ) |
Definition at line 547 of file ProfilingTests.cpp.
References BOOST_CHECK(), CaptureDataReadThreadImpl(), CaptureDataWriteThreadImpl(), Holder::GetCaptureData(), CaptureData::GetCapturePeriod(), and CaptureData::GetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CaptureDataMethods | ) |
Definition at line 617 of file ProfilingTests.cpp.
References BOOST_CHECK(), CaptureData::GetCapturePeriod(), CaptureData::GetCounterIds(), CaptureData::SetCapturePeriod(), and CaptureData::SetCounterIds().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceDisabled | ) |
Definition at line 643 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::GetCurrentState(), ProfilingService::Instance(), options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterDirectory | ) |
Definition at line 653 of file ProfilingTests.cpp.
References BOOST_CHECK(), ICounterDirectory::GetCounterCount(), ProfilingService::GetCounterDirectory(), ProfilingService::Instance(), options, profilingService, ProfilingService::ResetExternalProfilingOptions(), and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceCounterValues | ) |
Definition at line 676 of file ProfilingTests.cpp.
References ProfilingService::AddCounterValue(), BOOST_CHECK(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCounterValue(), ProfilingService::IncrementCounterValue(), ProfilingService::Instance(), options, profilingService, ProfilingService::ResetExternalProfilingOptions(), ProfilingService::SetCounterValue(), ProfilingService::SubtractCounterValue(), and ProfilingService::Update().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingObjectUids | ) |
Definition at line 730 of file ProfilingTests.cpp.
References BOOST_CHECK(), armnn::profiling::GetNextCounterUids(), and armnn::profiling::GetNextUid().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCategory | ) |
Definition at line 762 of file ProfilingTests.cpp.
References ARMNN_NO_CONVERSION_WARN_BEGIN, ARMNN_NO_CONVERSION_WARN_END, BOOST_CHECK(), CounterDirectory::GetCategory(), CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), Device::m_Cores, CounterSet::m_Count, Category::m_Counters, Category::m_CounterSetUid, Category::m_DeviceUid, 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 918 of file ProfilingTests.cpp.
References BOOST_CHECK(), CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDevice(), CounterDirectory::GetDeviceCount(), Device::m_Cores, Category::m_Counters, Category::m_CounterSetUid, Category::m_DeviceUid, Category::m_Name, Device::m_Name, Device::m_Uid, CounterDirectory::RegisterCategory(), and CounterDirectory::RegisterDevice().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCounterSet | ) |
Definition at line 1033 of file ProfilingTests.cpp.
References BOOST_CHECK(), CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSet(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), CounterSet::m_Count, Category::m_Counters, Category::m_CounterSetUid, Category::m_DeviceUid, Category::m_Name, CounterSet::m_Name, CounterSet::m_Uid, CounterDirectory::RegisterCategory(), and CounterDirectory::RegisterCounterSet().
BOOST_AUTO_TEST_CASE | ( | CheckCounterDirectoryRegisterCounter | ) |
Definition at line 1154 of file ProfilingTests.cpp.
References BOOST_CHECK(), CounterDirectory::GetCategoryCount(), CounterDirectory::GetCounter(), CounterDirectory::GetCounterCount(), CounterDirectory::GetCounterSetCount(), CounterDirectory::GetDeviceCount(), Counter::m_Class, Device::m_Cores, CounterSet::m_Count, Category::m_Counters, Category::m_CounterSetUid, Counter::m_CounterSetUid, Counter::m_Description, Category::m_DeviceUid, 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 1732 of file ProfilingTests.cpp.
References armnn::profiling::Active, Holder::GetCaptureData(), CaptureData::GetCapturePeriod(), CaptureData::GetCounterIds(), MockBufferManager::GetReadableBuffer(), armnn::LOWEST_CAPTURE_PERIOD, MockBufferManager::MarkRead(), armnn::profiling::NotConnected, 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 | ( | CheckConnectionAcknowledged | ) |
Definition at line 1875 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), ProfilingStateMachine::GetCurrentState(), armnn::profiling::NotConnected, ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, armnn::profiling::WaitingForAck, armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
BOOST_AUTO_TEST_CASE | ( | CheckSocketProfilingConnection | ) |
Definition at line 1942 of file ProfilingTests.cpp.
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidCharTest | ) |
Definition at line 1948 of file ProfilingTests.cpp.
References BOOST_CHECK(), and SwTraceCharPolicy::IsValidChar().
BOOST_AUTO_TEST_CASE | ( | SwTraceIsValidNameCharTest | ) |
Definition at line 1963 of file ProfilingTests.cpp.
References BOOST_CHECK(), and SwTraceNameCharPolicy::IsValidChar().
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceStringTest | ) |
Definition at line 2001 of file ProfilingTests.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | IsValidSwTraceNameStringTest | ) |
Definition at line 2020 of file ProfilingTests.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceStringTest | ) |
Definition at line 2062 of file ProfilingTests.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | StringToSwTraceNameStringTest | ) |
Definition at line 2086 of file ProfilingTests.cpp.
References BOOST_CHECK().
BOOST_AUTO_TEST_CASE | ( | CheckPeriodicCounterCaptureThread | ) |
Definition at line 2114 of file ProfilingTests.cpp.
References MockBufferManager::GetReadableBuffer(), armnn::profiling::ReadUint16(), armnn::profiling::ReadUint32(), Holder::SetCaptureData(), PeriodicCounterCapture::Start(), and PeriodicCounterCapture::Stop().
BOOST_AUTO_TEST_CASE | ( | RequestCounterDirectoryCommandHandlerTest1 | ) |
Definition at line 2222 of file ProfilingTests.cpp.
References armnn::profiling::Active, MockBufferManager::GetReadableBuffer(), armnn::profiling::NotConnected, armnn::profiling::ReadUint32(), ProfilingStateMachine::TransitionToState(), armnn::profiling::Uninitialised, and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | RequestCounterDirectoryCommandHandlerTest2 | ) |
Definition at line 2284 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), MockBufferManager::GetReadableBuffer(), Device::m_Uid, CounterSet::m_Uid, 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 2367 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), MockProfilingConnection::Clear(), armnn::profiling::CounterDirectory, ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), armnn::profiling::GetProcessName(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodRequestCounterDirectoryPacket | ) |
Definition at line 2432 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), armnn::profiling::CounterDirectory, SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadPeriodicCounterSelectionPacketInvalidCounterUid | ) |
Definition at line 2490 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), MockProfilingConnection::Clear(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, 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 2568 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPeriodicCounterSelectionPacketSingleCounter | ) |
Definition at line 2632 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, 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 2709 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, 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 2787 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), ProfilingService::Disconnect(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), MockProfilingConnection::IsOpen(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceGoodPerJobCounterSelectionPacket | ) |
Definition at line 2844 of file ProfilingTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), MockProfilingConnection::GetWrittenDataSize(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::StreamMetaData, armnn::profiling::Uninitialised, ProfilingService::Update(), SwapProfilingConnectionFactoryHelper::WaitForPacketsSent(), armnn::profiling::WaitingForAck, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckConfigureProfilingServiceOn | ) |
Definition at line 2910 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::ConfigureProfilingService(), ProfilingService::GetCurrentState(), ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), and armnn::profiling::Uninitialised.
BOOST_AUTO_TEST_CASE | ( | CheckConfigureProfilingServiceOff | ) |
Definition at line 2924 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::ConfigureProfilingService(), ProfilingService::GetCurrentState(), ProfilingService::Instance(), options, profilingService, ProfilingService::ResetExternalProfilingOptions(), and armnn::profiling::Uninitialised.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceEnabled | ) |
Definition at line 2937 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::GetCurrentState(), ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceEnabledRuntime | ) |
Definition at line 2968 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::GetCurrentState(), ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadConnectionAcknowledgedPacket | ) |
Definition at line 3003 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, armnn::Warning, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadRequestCounterDirectoryPacket | ) |
Definition at line 3064 of file ProfilingTests.cpp.
References BOOST_CHECK(), SwapProfilingConnectionFactoryHelper::ForceTransitionToState(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, and armnn::Warning.
BOOST_AUTO_TEST_CASE | ( | CheckProfilingServiceBadPeriodicCounterSelectionPacket | ) |
Definition at line 3127 of file ProfilingTests.cpp.
References BOOST_CHECK(), ProfilingService::GetCurrentState(), SwapProfilingConnectionFactoryHelper::GetMockProfilingConnection(), helper, ProfilingService::Instance(), armnn::profiling::NotConnected, options, profilingService, ProfilingService::ResetExternalProfilingOptions(), armnn::profiling::Uninitialised, ProfilingService::Update(), armnn::profiling::WaitingForAck, armnn::Warning, and MockProfilingConnection::WritePacket().
BOOST_AUTO_TEST_CASE | ( | CheckCounterIdMap | ) |
Definition at line 3190 of file ProfilingTests.cpp.
References BOOST_CHECK(), armnn::CpuAcc, armnn::CpuRef, CounterIdMap::GetBackendId(), CounterIdMap::GetGlobalId(), and CounterIdMap::RegisterMapping().
BOOST_AUTO_TEST_CASE | ( | CheckRegisterBackendCounters | ) |
Definition at line 3230 of file ProfilingTests.cpp.
References BOOST_CHECK(), armnn::CpuRef, ICounterMappings::GetBackendId(), ICounterDirectory::GetCategories(), ICounterDirectory::GetCategory(), ProfilingService::GetCounterDirectory(), ProfilingService::GetCounterMappings(), ICounterDirectory::GetCounterSet(), ICounterDirectory::GetCounterSets(), ICounterDirectory::GetDevice(), ICounterDirectory::GetDevices(), ICounterMappings::GetGlobalId(), ProfilingService::Instance(), options, profilingService, RegisterBackendCounters::RegisterCategory(), RegisterBackendCounters::RegisterCounter(), RegisterBackendCounters::RegisterCounterSet(), RegisterBackendCounters::RegisterDevice(), and ProfilingService::ResetExternalProfilingOptions().
BOOST_AUTO_TEST_CASE | ( | CheckCounterStatusQuery | ) |
Definition at line 3279 of file ProfilingTests.cpp.
References BOOST_CHECK(), armnn::CpuAcc, armnn::CpuRef, BackendProfiling::GetActiveCounters(), ICounterMappings::GetBackendId(), ICounterDirectory::GetCategories(), ICounterDirectory::GetCategory(), ProfilingService::GetCounterDirectory(), ProfilingService::GetCounterMappings(), BackendProfiling::GetCounterStatus(), ICounterMappings::GetGlobalId(), ProfilingService::Instance(), CounterStatus::m_BackendCounterId, CounterStatus::m_Enabled, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, CounterStatus::m_GlobalCounterId, IRuntime::CreationOptions::m_ProfilingOptions, CounterStatus::m_SamplingRateInMicroseconds, options, profilingService, RegisterBackendCounters::RegisterCategory(), RegisterBackendCounters::RegisterCounter(), ProfilingService::ResetExternalProfilingOptions(), and ProfilingService::SetCaptureData().
BOOST_AUTO_TEST_CASE | ( | CheckRegisterCounters | ) |
Definition at line 3416 of file ProfilingTests.cpp.
References BOOST_AUTO_TEST_SUITE_END(), Timestamp::counterValues, armnn::CpuRef, MockBufferManager::GetReadableBuffer(), IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_ProfilingOptions, options, armnn::profiling::ReadUint16(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), MockProfilingService::RegisterMapping(), BackendProfiling::ReportCounters(), and Timestamp::timestamp.
void CaptureDataReadThreadImpl | ( | const Holder & | holder, |
CaptureData & | captureData | ||
) |
Definition at line 542 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 537 of file ProfilingTests.cpp.
References Holder::SetCaptureData().
Referenced by BOOST_AUTO_TEST_CASE().
void ProfilingCurrentStateThreadImpl | ( | ProfilingStateMachine & | states | ) |
Definition at line 454 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 2040 of file ProfilingTests.cpp.
References BOOST_CHECK().