aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingConnectionFactory.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2019-10-17 09:52:50 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-22 08:02:04 +0000
commitb10e08180dc1576fbe0f838a9f0277ab4b3f40f4 (patch)
treebd97c3227a573add7bedd0ded0dc8e688402a95c /src/profiling/ProfilingConnectionFactory.cpp
parent98d6b3d7e9eef724c6ed64c85c23cd1ad04d7c5a (diff)
downloadarmnn-b10e08180dc1576fbe0f838a9f0277ab4b3f40f4.tar.gz
Fix for bug where ProfilingConnectionDumpToFactory is not used in profiling service
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I962093766a79fefc8fb91b9bc3d5bd8f28c35114
Diffstat (limited to 'src/profiling/ProfilingConnectionFactory.cpp')
-rw-r--r--src/profiling/ProfilingConnectionFactory.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/profiling/ProfilingConnectionFactory.cpp b/src/profiling/ProfilingConnectionFactory.cpp
index faecea7526..759eb7a95e 100644
--- a/src/profiling/ProfilingConnectionFactory.cpp
+++ b/src/profiling/ProfilingConnectionFactory.cpp
@@ -5,6 +5,7 @@
#include "ProfilingConnectionFactory.hpp"
#include "SocketProfilingConnection.hpp"
+#include "ProfilingConnectionDumpToFileDecorator.hpp"
namespace armnn
{
@@ -15,7 +16,17 @@ namespace profiling
std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingConnection(
const Runtime::CreationOptions::ExternalProfilingOptions& options) const
{
- return std::make_unique<SocketProfilingConnection>();
+ if ( !options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty() )
+ {
+ bool ignoreFailures = false;
+ return std::make_unique<ProfilingConnectionDumpToFileDecorator>(std::make_unique<SocketProfilingConnection>(),
+ options,
+ ignoreFailures);
+ }
+ else
+ {
+ return std::make_unique<SocketProfilingConnection>();
+ }
}
} // namespace profiling