Skip to content

v0.2.54..v0.2.55 changeset BuildModelCmd.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/cmd/BuildModelCmd.cpp b/hoot-core/src/main/cpp/hoot/core/cmd/BuildModelCmd.cpp
index c44b269..b5639e9 100644
--- a/hoot-core/src/main/cpp/hoot/core/cmd/BuildModelCmd.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/cmd/BuildModelCmd.cpp
@@ -22,15 +22,18 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 // Hoot
 #include <hoot/core/util/Factory.h>
 #include <hoot/core/cmd/BaseCommand.h>
-
 #include <hoot/core/io/ArffToRfConverter.h>
 #include <hoot/core/scoring/RandomForestModelBuilder.h>
+#include <hoot/core/util/StringUtils.h>
+
+// Qt
+#include <QElapsedTimer>
 
 namespace hoot
 {
@@ -50,6 +53,9 @@ public:
 
   virtual int runSimple(QStringList& args) override
   {
+    QElapsedTimer timer;
+    timer.start();
+
     // This argument is only valid when converting to .rf from training data.
     bool exportArffOnly = false;
     if (args.contains("--export-arff-only"))
@@ -83,6 +89,8 @@ public:
       RandomForestModelBuilder::build(inputs, args.last(), exportArffOnly);
     }
 
+    LOG_STATUS("Model built in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
     return 0;
   }
 };
Clone this wiki locally