mirror of https://github.com/google/benchmark.git
move ConsoleReporter out of internal namespace
This commit is contained in:
parent
d71660227b
commit
e45252e6f5
|
@ -78,12 +78,6 @@ class BenchmarkReporter {
|
|||
virtual ~BenchmarkReporter();
|
||||
};
|
||||
|
||||
|
||||
namespace internal {
|
||||
|
||||
// ------------------------------------------------------
|
||||
// Internal implementation details follow; please ignore
|
||||
|
||||
// Simple reporter that outputs benchmark data to the console. This is the
|
||||
// default reporter used by RunSpecifiedBenchmarks().
|
||||
class ConsoleReporter : public BenchmarkReporter {
|
||||
|
@ -96,6 +90,5 @@ class ConsoleReporter : public BenchmarkReporter {
|
|||
mutable size_t name_field_width_;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
} // end namespace benchmark
|
||||
#endif // BENCHMARK_REPORTER_H_
|
||||
|
|
|
@ -817,7 +817,7 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter) {
|
|||
std::string spec = FLAGS_benchmark_filter;
|
||||
if (spec.empty() || spec == "all")
|
||||
spec = "."; // Regexp that matches all benchmarks
|
||||
internal::ConsoleReporter default_reporter;
|
||||
ConsoleReporter default_reporter;
|
||||
internal::RunMatchingBenchmarks(spec, reporter ? reporter : &default_reporter);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,9 +88,6 @@ void ComputeStats(const std::vector<BenchmarkReporter::Run>& reports,
|
|||
|
||||
BenchmarkReporter::~BenchmarkReporter() {}
|
||||
|
||||
|
||||
namespace internal {
|
||||
|
||||
bool ConsoleReporter::ReportContext(const Context& context) const {
|
||||
name_field_width_ = context.name_field_width;
|
||||
|
||||
|
@ -189,6 +186,4 @@ void ConsoleReporter::PrintRunData(const Run& result) const {
|
|||
result.report_label.c_str());
|
||||
}
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace benchmark
|
||||
|
|
|
@ -21,7 +21,7 @@ double CalculatePi(int depth) {
|
|||
return (pi - 1.0) * 4;
|
||||
}
|
||||
|
||||
class TestReporter : public benchmark::internal::ConsoleReporter {
|
||||
class TestReporter : public benchmark::ConsoleReporter {
|
||||
public:
|
||||
virtual bool ReportContext(const Context& context) const {
|
||||
return ConsoleReporter::ReportContext(context);
|
||||
|
|
Loading…
Reference in New Issue