yoavnir / specs2016

New version of the specs pipeline stage based on what's in current CMS pipelines
MIT License
1 stars 1 forks source link

Issue #267 - Add a "progress bar" to specs using --progress switch #268

Closed yoavnir closed 2 weeks ago

yoavnir commented 2 weeks ago

Make it more pretty:

$ git diff
diff --git a/specs/src/specitems/specItems.cc b/specs/src/specitems/specItems.cc
index 0789420..e2029c9 100644
--- a/specs/src/specitems/specItems.cc
+++ b/specs/src/specitems/specItems.cc
@@ -591,7 +591,9 @@ void itemGroup::process(StringBuilder& sb, ProcessingState& pState, Reader& rd,

                if (g_bShowProgress && (time(nullptr)!=progressTick)) {
                        progressTick = time(nullptr);
-                       std::cerr << "\n\tspecs: Read " << pState.getRecordCount() << " records.\n";
+            auto pv = mkValue(pState.getRecordCount());
+            auto pvs = AluFunc_pretty(pv, nullptr, nullptr, nullptr);
+                       std::cerr << "\n\tspecs: Read " << pvs->getStr() << " records.\n";
                }

                if (processDo(sb,pState, &rd, tmr, readerCounter)) {