1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 22:40:33 +08:00

feat: modified the List() in output_test_helper

This commit is contained in:
varshneydevansh 2023-08-12 09:03:58 +05:30
parent 4132a67034
commit a29702c6f7

View File

@ -166,13 +166,10 @@ class TestReporter : public benchmark::BenchmarkReporter {
void List(const std::vector<benchmark::internal::BenchmarkInstance>&
benchmarks) override {
// providing summary of bechmarks as of now
int total = benchmarks.size();
int flaggedCount =
std::count_if(benchmarks.begin(), benchmarks.end(),
[](const auto& b) { return b.isFlagSet(); });
std::cout << "Total benchmarks: " << total << ", Flagged: " << flaggedCount
<< std::endl;
// simply logging the status
for (const auto& benchmark : benchmarks) {
std::cout << benchmark.name().str() << std::endl;
}
}
private: