diff --git a/include/pcp-cpp/pmda.hpp b/include/pcp-cpp/pmda.hpp index 61d10f6..707c11f 100644 --- a/include/pcp-cpp/pmda.hpp +++ b/include/pcp-cpp/pmda.hpp @@ -891,7 +891,11 @@ class pmda { << cluster_iter->first << std::endl; } } else { - stream << " " << cluster_name << std::endl; + static std::string previous_cluster_name; + if (cluster_name != previous_cluster_name) { + stream << " " << cluster_name << std::endl; + previous_cluster_name = cluster_name; + } } } stream << '}' << std::endl;