debug required count
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
6830617a2b
commit
30b64d5fbe
|
|
@ -49,11 +49,12 @@ public:
|
||||||
int statsLevel() const { return stats_level_; }
|
int statsLevel() const { return stats_level_; }
|
||||||
void reportLine(const char *what,
|
void reportLine(const char *what,
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
...) const
|
...)
|
||||||
__attribute__((format (printf, 3, 4)));
|
__attribute__((format (printf, 3, 4)));
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Report *report_;
|
Report *report_;
|
||||||
|
std::mutex buffer_lock_;
|
||||||
bool debug_on_;
|
bool debug_on_;
|
||||||
DebugMap *debug_map_;
|
DebugMap *debug_map_;
|
||||||
int stats_level_;
|
int stats_level_;
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,7 @@ BfsIterator::visitParallel(Level to_level,
|
||||||
}
|
}
|
||||||
visitor->levelFinished();
|
visitor->levelFinished();
|
||||||
level_vertices.clear();
|
level_vertices.clear();
|
||||||
|
visit_count += vertex_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (VertexVisitor *visitor : visitors)
|
for (VertexVisitor *visitor : visitors)
|
||||||
|
|
|
||||||
|
|
@ -114,10 +114,11 @@ Debug::setLevel(const char *what,
|
||||||
void
|
void
|
||||||
Debug::reportLine(const char *what,
|
Debug::reportLine(const char *what,
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
...) const
|
...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
std::unique_lock<std::mutex> lock(buffer_lock_);
|
||||||
report_->printToBuffer("%s", what);
|
report_->printToBuffer("%s", what);
|
||||||
report_->printToBufferAppend(": ");
|
report_->printToBufferAppend(": ");
|
||||||
report_->printToBufferAppend(fmt, args);
|
report_->printToBufferAppend(fmt, args);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue