20.05
|
#include <CommandHandlerRegistry.hpp>
#include <ConnectionHandler.hpp>
#include <DirectoryCaptureCommandHandler.hpp>
#include <GatordMockService.hpp>
#include <LabelsAndEventClasses.hpp>
#include <ProfilingService.hpp>
#include <TimelinePacketWriterFactory.hpp>
#include <TimelineDirectoryCaptureCommandHandler.hpp>
#include <TimelineDecoder.hpp>
#include <Runtime.hpp>
#include <MockBackend.hpp>
#include <boost/cast.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test_suite.hpp>
Go to the source code of this file.
Functions | |
BOOST_AUTO_TEST_CASE (CounterCaptureHandlingTest) | |
void | WaitFor (std::function< bool()> predicate, std::string errorMsg, uint32_t timeout=2000, uint32_t sleepTime=50) |
void | CheckTimelineDirectory (timelinedecoder::TimelineDirectoryCaptureCommandHandler &commandHandler) |
void | CheckTimelinePackets (timelinedecoder::TimelineDecoder &timelineDecoder) |
BOOST_AUTO_TEST_CASE (GatorDMockEndToEnd) | |
BOOST_AUTO_TEST_CASE (GatorDMockTimeLineActivation) | |
BOOST_AUTO_TEST_CASE | ( | CounterCaptureHandlingTest | ) |
Definition at line 32 of file GatordMockTests.cpp.
References ARMNN_ASSERT, Version::GetEncodedValue(), PeriodicCounterCaptureCommandHandler::m_CounterCaptureValues, PeriodicCounterCaptureCommandHandler::m_CurrentPeriodValue, CounterCaptureValues::m_Uids, armnn::numeric_cast(), PacketVersionResolver::ResolvePacketVersion(), armnn::profiling::WriteUint16(), armnn::profiling::WriteUint32(), and armnn::profiling::WriteUint64().
BOOST_AUTO_TEST_CASE | ( | GatorDMockEndToEnd | ) |
Definition at line 226 of file GatordMockTests.cpp.
References armnn::profiling::Active, BOOST_CHECK(), CheckTimelineDirectory(), CheckTimelinePackets(), ICounterDirectory::GetCategories(), ICounterDirectory::GetCategoryCount(), ICounterDirectory::GetCounter(), ICounterDirectory::GetCounterCount(), DirectoryCaptureCommandHandler::GetCounterDirectory(), ProfilingService::GetCounterDirectory(), ICounterDirectory::GetCounters(), ICounterDirectory::GetCounterSetCount(), ICounterDirectory::GetCounterSets(), ProfilingService::GetCurrentState(), ICounterDirectory::GetDeviceCount(), ICounterDirectory::GetDevices(), GatordMockService::GetDirectoryCaptureCommandHandler(), TimelineDecoder::GetModel(), GatordMockService::GetTimelineDecoder(), GatordMockService::GetTimelineDirectoryCaptureCommandHandler(), GatordMockService::LaunchReceivingThread(), Counter::m_Class, Counter::m_CounterSetUid, Counter::m_Description, Counter::m_DeviceUid, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, TimelineDecoder::Model::m_EventClasses, Counter::m_Interpolation, Counter::m_Multiplier, Counter::m_Name, IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled, Counter::m_Units, armnn::profiling::NotConnected, options, DirectoryCaptureCommandHandler::ParsedCounterDirectory(), profilingService, ProfilingService::ResetExternalProfilingOptions(), GatordMockService::SendConnectionAck(), DirectoryCaptureCommandHandler::TranslateUIDCopyToOriginal(), armnn::profiling::Uninitialised, ProfilingService::Update(), WaitFor(), GatordMockService::WaitForReceivingThread(), GatordMockService::WaitForStreamMetaData(), and armnn::profiling::WaitingForAck.
BOOST_AUTO_TEST_CASE | ( | GatorDMockTimeLineActivation | ) |
Definition at line 378 of file GatordMockTests.cpp.
References armnn::BackendRegistryInstance(), BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), IOutputSlot::Connect(), armnn::CpuRef, INetwork::Create(), ProfilingService::Disconnect(), armnn::Float32, MockBackendProfilingService::GetContext(), Runtime::GetDeviceSpec(), GatordMockService::GetDirectoryCaptureCommandHandler(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::GetProfilingService(), GatordMockService::GetTimelineDecoder(), MockBackendProfilingService::Instance(), GatordMockService::LaunchReceivingThread(), Runtime::LoadNetwork(), IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_ProfilingOptions, IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled, armnn::Optimize(), options, DirectoryCaptureCommandHandler::ParsedCounterDirectory(), GatordMockService::SendActivateTimelinePacket(), GatordMockService::SendConnectionAck(), GatordMockService::SendDeactivateTimelinePacket(), IOutputSlot::SetTensorInfo(), MockBackendProfilingContext::TimelineReportingEnabled(), WaitFor(), GatordMockService::WaitForReceivingThread(), and GatordMockService::WaitForStreamMetaData().
void CheckTimelineDirectory | ( | timelinedecoder::TimelineDirectoryCaptureCommandHandler & | commandHandler | ) |
Definition at line 125 of file GatordMockTests.cpp.
References BOOST_CHECK(), BufferManager::GetReadableBuffer(), TimelinePacketWriterFactory::GetSendTimelinePacket(), SwTraceMessage::m_ArgNames, SwTraceMessage::m_ArgTypes, SwTraceMessage::m_Id, SwTraceMessage::m_Name, TimelineDirectoryCaptureCommandHandler::m_SwTraceMessages, SwTraceMessage::m_UiName, armnn::profiling::ReadSwTraceMessage(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint8(), and armnn::profiling::uint32_t_size.
Referenced by BOOST_AUTO_TEST_CASE().
void CheckTimelinePackets | ( | timelinedecoder::TimelineDecoder & | timelineDecoder | ) |
Definition at line 187 of file GatordMockTests.cpp.
References LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS, LabelsAndEventClasses::BACKENDID_GUID, LabelsAndEventClasses::BACKENDID_LABEL, BOOST_CHECK(), LabelsAndEventClasses::CONNECTION, LabelsAndEventClasses::CONNECTION_GUID, TimelineDecoder::GetModel(), LabelsAndEventClasses::INDEX_GUID, LabelsAndEventClasses::INDEX_LABEL, LabelsAndEventClasses::INFERENCE, LabelsAndEventClasses::INFERENCE_GUID, LabelsAndEventClasses::LAYER, LabelsAndEventClasses::LAYER_GUID, TimelineDecoder::Model::m_EventClasses, TimelineDecoder::Model::m_Labels, LabelsAndEventClasses::NAME_GUID, LabelsAndEventClasses::NAME_LABEL, LabelsAndEventClasses::NETWORK, LabelsAndEventClasses::NETWORK_GUID, LabelsAndEventClasses::TYPE_GUID, LabelsAndEventClasses::TYPE_LABEL, LabelsAndEventClasses::WORKLOAD, LabelsAndEventClasses::WORKLOAD_EXECUTION, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID, and LabelsAndEventClasses::WORKLOAD_GUID.
Referenced by BOOST_AUTO_TEST_CASE().
void WaitFor | ( | std::function< bool()> | predicate, |
std::string | errorMsg, | ||
uint32_t | timeout = 2000 , |
||
uint32_t | sleepTime = 50 |
||
) |
Definition at line 111 of file GatordMockTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().