1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

context: report Task instance count

Report the number of Task objects that currently exist as well as the number
on the global work queue.

	THREADS (work queue 298 of 2385 tasks, 16 workers):

This helps spot leaks, since Task objects that are blocked on other Task
post-exec queues are otherwise invisible.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2021-05-29 23:31:40 -04:00
parent 5f763f6d41
commit 4f032ab85b

View File

@ -82,7 +82,7 @@ BeesContext::dump_status()
ofs << "RATES:\n"; ofs << "RATES:\n";
ofs << "\t" << avg_rates << "\n"; ofs << "\t" << avg_rates << "\n";
ofs << "THREADS (work queue " << TaskMaster::get_queue_count() << " tasks, " << TaskMaster::get_thread_count() << " workers):\n"; ofs << "THREADS (work queue " << TaskMaster::get_queue_count() << " of " << Task::instance_count() << " tasks, " << TaskMaster::get_thread_count() << " workers):\n";
for (auto t : BeesNote::get_status()) { for (auto t : BeesNote::get_status()) {
ofs << "\ttid " << t.first << ": " << t.second << "\n"; ofs << "\ttid " << t.first << ": " << t.second << "\n";
} }