aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingConnectionFactory.cpp
diff options
context:
space:
mode:
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