Skip to content

v0.2.54..v0.2.55 changeset WriteNameCountsCmd.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/cmd/WriteNameCountsCmd.cpp b/hoot-core/src/main/cpp/hoot/core/cmd/WriteNameCountsCmd.cpp
index f3c8c66..5e63a5b 100644
--- a/hoot-core/src/main/cpp/hoot/core/cmd/WriteNameCountsCmd.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/cmd/WriteNameCountsCmd.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 // Hoot
@@ -32,10 +32,14 @@
 #include <hoot/core/io/WordCountWriter.h>
 #include <hoot/core/util/Log.h>
 #include <hoot/core/schema/TagDistribution.h>
+#include <hoot/core/util/StringUtils.h>
 
 // Standard
 #include <map>
 
+// Qt
+#include <QElapsedTimer>
+
 namespace hoot
 {
 
@@ -61,6 +65,9 @@ public:
 
   virtual int runSimple(QStringList& args) override
   {
+    QElapsedTimer timer;
+    timer.start();
+
     if (args.size() < 2)
     {
       cout << getHelp() << endl << endl;
@@ -94,6 +101,9 @@ public:
 
     cout << "Total word count: " << total << endl;
 
+    LOG_STATUS(
+      "Names counted in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
     return 0;
   }
 };
Clone this wiki locally