mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
tools/scylla-nodetool: print separator between samplings
instead of printing it out after samplings, we should print it in between them. as toppartitions_test.py in dtest splits the samplings using "\n\n". without this change, dtest would consider the empty line as another sampling and then fail the test. as the empty sampling does not match with the expected regular expressions. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -1995,6 +1995,9 @@ void toppartitions_operation(scylla_rest_client& client, const bpo::variables_ma
|
||||
bool first = true;
|
||||
for (const auto& operation : operations) {
|
||||
// add a separator
|
||||
if (!std::exchange(first, false)) {
|
||||
fmt::print("\n");
|
||||
}
|
||||
auto cardinality = toppartitions[fmt::format("{}_cardinality", operation)].GetInt64();
|
||||
fmt::print("{}S Sampler:\n", boost::to_upper_copy(operation));
|
||||
fmt::print(" Cardinality: ~{} ({} capacity)\n", cardinality, capacity);
|
||||
@@ -2028,9 +2031,6 @@ void toppartitions_operation(scylla_rest_client& client, const bpo::variables_ma
|
||||
fmt::print("\t{:<{}}{:>10}{:>10}\n", record.partition, width, record.count, record.error);
|
||||
}
|
||||
}
|
||||
if (std::exchange(first, false)) {
|
||||
fmt::print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user