[nnpackage_run] Fix time unit shown (#8398)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Fri, 25 Oct 2019 01:08:45 +0000 (10:08 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 25 Oct 2019 01:08:45 +0000 (10:08 +0900)
Fix printed time unit `sec` to `ms`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
tests/tools/nnpackage_run/README.md
tests/tools/nnpackage_run/src/nnpackage_run.cc

index c7167b2..898cc84 100644 (file)
@@ -17,6 +17,6 @@ $ ./nnpackage_run path_to_nnpackage_directory
 Output would look like:
 
 ```
-nnfw_prepare takes 425.235 sec
-nnfw_run     takes 2.525 sec
+nnfw_prepare takes 425.235 ms
+nnfw_run     takes 2.525 ms
 ```
index 68c2e7f..254ef55 100644 (file)
@@ -123,9 +123,9 @@ int main(const int argc, char **argv)
 
   // prepare execution
 
-  uint64_t prepare_ms = NowMicros();
+  uint64_t prepare_us = NowMicros();
   NNPR_ENSURE_STATUS(nnfw_prepare(session));
-  prepare_ms = NowMicros() - prepare_ms;
+  prepare_us = NowMicros() - prepare_us;
 
   // prepare input
 
@@ -221,9 +221,9 @@ int main(const int argc, char **argv)
                                        sizeof(float) * output_num_elements));
   }
 
-  uint64_t run_ms = NowMicros();
+  uint64_t run_us = NowMicros();
   NNPR_ENSURE_STATUS(nnfw_run(session));
-  run_ms = NowMicros() - run_ms;
+  run_us = NowMicros() - run_us;
 
   // dump output tensors
 
@@ -254,8 +254,8 @@ int main(const int argc, char **argv)
   if (!args.getDumpFilename().empty())
     dumpOutputs(args.getDumpFilename());
 
-  std::cout << "nnfw_prepare takes " << prepare_ms / 1e3 << " sec" << std::endl;
-  std::cout << "nnfw_run     takes " << run_ms / 1e3 << " sec" << std::endl;
+  std::cout << "nnfw_prepare takes " << prepare_us / 1e3 << " ms" << std::endl;
+  std::cout << "nnfw_run     takes " << run_us / 1e3 << " ms" << std::endl;
 
   NNPR_ENSURE_STATUS(nnfw_close_session(session));