Improve printing to cout for profiling purposes
If your algo is in a function:
void myAlgorithm(...) { // potentially expensive stuff here }
void myAlgorithm(...) { PsimagLite::Profiling profiling("myAlgorithm", std::cout); // potentially expensive stuff here }
which calls ctor/dtor within function scope.
If algo is in smaller than function scope then use scoping braces (or call profiling.end() if you must.)
If algo is in larger than function scope it's left as an exercise for the programmer.
It's very IMPORTANT to maintain TOTAL times correct, that is, that the sum of times spent by all modules yields the total time spent by the run