IVGCVSW-8298 Fix failing fsrcnn test

Change-Id: I03c26ab763ec306a6efe31f9b4e0b1c058589bf7
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp
index 7060497..4518f14 100644
--- a/tests/ExecuteNetwork/ArmNNExecutor.cpp
+++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp
@@ -91,7 +91,12 @@
 
 ArmNNExecutor::~ArmNNExecutor()
 {
-    m_Runtime->UnloadNetwork(m_NetworkId);
+    std::shared_ptr<armnn::IProfiler> profiler = m_Runtime->GetProfiler(m_NetworkId);
+    // If profiling is enabled print out the results
+    if (profiler && profiler->IsProfilingEnabled())
+    {
+        profiler->Print(std::cout);
+    }
 }
 
 void ArmNNExecutor::ExecuteAsync()
@@ -194,12 +199,6 @@
 
         const auto inferenceDuration = armnn::GetTimeDuration(start_time);
 
-        // If profiling is enabled print out the results
-        if(profiler && profiler->IsProfilingEnabled() && x == (m_Params.m_Iterations - 1))
-        {
-            profiler->Print(std::cout);
-        }
-
         if(ret == armnn::Status::Failure)
         {
             throw armnn::Exception("IRuntime::EnqueueWorkload failed");