debug required count

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-04-25 16:35:15 -07:00
parent 6830617a2b
commit 30b64d5fbe
3 changed files with 5 additions and 2 deletions

View File

@ -49,11 +49,12 @@ public:
int statsLevel() const { return stats_level_; }
void reportLine(const char *what,
const char *fmt,
...) const
...)
__attribute__((format (printf, 3, 4)));
protected:
Report *report_;
std::mutex buffer_lock_;
bool debug_on_;
DebugMap *debug_map_;
int stats_level_;

View File

@ -217,6 +217,7 @@ BfsIterator::visitParallel(Level to_level,
}
visitor->levelFinished();
level_vertices.clear();
visit_count += vertex_count;
}
}
for (VertexVisitor *visitor : visitors)

View File

@ -114,10 +114,11 @@ Debug::setLevel(const char *what,
void
Debug::reportLine(const char *what,
const char *fmt,
...) const
...)
{
va_list args;
va_start(args, fmt);
std::unique_lock<std::mutex> lock(buffer_lock_);
report_->printToBuffer("%s", what);
report_->printToBufferAppend(": ");
report_->printToBufferAppend(fmt, args);