diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-10 14:08:21 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-11 16:33:29 +0100 |
commit | e848538efbdf01aa0b067da942c3c214f8e62826 (patch) | |
tree | d700239f1316a098849fcfc39ec70e926f86fd62 /src/profiling/test/ProfilingTests.hpp | |
parent | f982deaefbe5fe5814487b27f7099829839b8666 (diff) | |
download | armnn-e848538efbdf01aa0b067da942c3c214f8e62826.tar.gz |
IVGCVSW-3964 Implement the Periodic Counter Selection command handler
* Improved the PeriodicCounterPacket class to handle errors properly
* Improved the PeriodicCounterSelectionCommandHandler to handle
invalid counter UIDs in the selection packet
* Added the Periodic Counter Selection command handler to the
ProfilingService class
* Code refactoring and added comments
* Added WaitForPacketSent method to the SendCounterPacket class
to allow waiting for the packets to be sent (useful in the
unit tests)
* Added unit tests and updated the old ones accordingly
* Fixed threading issues with a number of unit tests
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: I271b7b0bfa801d88fe1725b934d24e30cd839ed7
Diffstat (limited to 'src/profiling/test/ProfilingTests.hpp')
-rw-r--r-- | src/profiling/test/ProfilingTests.hpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/profiling/test/ProfilingTests.hpp b/src/profiling/test/ProfilingTests.hpp index 4d2f974344..21c98723be 100644 --- a/src/profiling/test/ProfilingTests.hpp +++ b/src/profiling/test/ProfilingTests.hpp @@ -9,14 +9,12 @@ #include <CommandHandlerFunctor.hpp> #include <IProfilingConnection.hpp> -#include <IProfilingConnectionFactory.hpp> #include <Logging.hpp> #include <ProfilingService.hpp> #include <boost/test/unit_test.hpp> #include <chrono> -#include <iostream> #include <thread> namespace armnn @@ -137,15 +135,6 @@ class TestFunctorC : public TestFunctorA using TestFunctorA::TestFunctorA; }; -class MockProfilingConnectionFactory : public IProfilingConnectionFactory -{ -public: - IProfilingConnectionPtr GetProfilingConnection(const ExternalProfilingOptions& options) const override - { - return std::make_unique<MockProfilingConnection>(); - } -}; - class SwapProfilingConnectionFactoryHelper : public ProfilingService { public: @@ -182,6 +171,11 @@ public: TransitionToState(ProfilingService::Instance(), newState); } + void WaitForProfilingPacketsSent() + { + return WaitForPacketSent(ProfilingService::Instance()); + } + private: MockProfilingConnectionFactoryPtr m_MockProfilingConnectionFactory; IProfilingConnectionFactory* m_BackupProfilingConnectionFactory; |