diff --git a/src/vault/gear/scheduler.hpp b/src/vault/gear/scheduler.hpp index 7ed957a9e..cc563d440 100644 --- a/src/vault/gear/scheduler.hpp +++ b/src/vault/gear/scheduler.hpp @@ -115,6 +115,7 @@ //#include "lib/symbol.hpp" #include "lib/nocopy.hpp" //#include "lib/util.hpp" +#include "lib/format-cout.hpp"///////////////////////TODO //#include #include @@ -583,6 +584,26 @@ namespace gear { return move(*this); } +namespace{ + inline string + relT (int64_t pling) + { + static int64_t nulli{0}; + if (nulli == 0) nulli = pling; + return util::toString(pling - nulli); + } + inline string + relT (Time plong) + { + return relT(_raw(plong)); + } + + inline string + markThread() + { + return util::showHashLSB (std::hash{}(thisThread())); + } +} /** * Enqueue for time-bound execution, possibly dispatch immediately. @@ -593,7 +614,8 @@ namespace gear { inline void Scheduler::postChain (ActivationEvent actEvent) { - maybeScaleWorkForce(); + maybeScaleWorkForce (); +cout<<"‖SCH‖ "+markThread()+": @"+relT(RealClock::now())+" ○ start="+relT(actEvent.starting)+" dead:"+util::toString(actEvent.deadline - actEvent.starting)< "+(toDispatch? "▶ "+relT(toDispatch.starting): string("∘"))<level <level > targetLevel) break; scheduleCalcJob_(currIdx_, n->level); @@ -1250,6 +1253,7 @@ namespace test { void disposeStep (size_t idx, size_t level) { +cout <<_Fmt{"... dispose(i=%d,lev:%d) -> @%s"} % idx % level % relT(calcStartTime(level))< reschedule to "<