From 771834793f958d449ada71bff4ed4517bda0edbf Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Mon, 17 Apr 2017 16:49:26 -0700 Subject: [PATCH] Only log components in Debug mode, it's very wordy and not really useful (#3948) for Release builds. Log component counts at the end of the SCC run. --- include/extractor/tarjan_scc.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/extractor/tarjan_scc.hpp b/include/extractor/tarjan_scc.hpp index dbcaeddc5..2eea7efe7 100644 --- a/include/extractor/tarjan_scc.hpp +++ b/include/extractor/tarjan_scc.hpp @@ -69,6 +69,7 @@ template class TarjanSCC std::stack tarjan_stack; std::vector tarjan_node_list(max_node_id); unsigned component_index = 0, size_of_current_component = 0; + unsigned large_component_count = 0; unsigned index = 0; std::vector processing_node_before_recursion(max_node_id, true); for (const NodeID node : util::irange(0u, max_node_id)) @@ -146,8 +147,9 @@ template class TarjanSCC if (size_of_current_component > 1000) { - util::Log() << "large component [" << component_index - << "]=" << size_of_current_component; + ++large_component_count; + util::Log(logDEBUG) << "large component [" << component_index + << "]=" << size_of_current_component; } ++component_index; @@ -158,6 +160,8 @@ template class TarjanSCC } TIMER_STOP(SCC_RUN); + util::Log() << "Found " << component_index << " SCC (" << large_component_count + << " large, " << (component_index - large_component_count) << " small)"; util::Log() << "SCC run took: " << TIMER_MSEC(SCC_RUN) / 1000. << "s"; size_one_counter = std::count_if(component_size_vector.begin(),