Commit 11e30435 by Ismael

checked format before pull request

parent 212cfe1c
...@@ -263,7 +263,7 @@ public: ...@@ -263,7 +263,7 @@ public:
State(size_t max_iters, bool has_x, int x, bool has_y, int y, State(size_t max_iters, bool has_x, int x, bool has_y, int y,
int thread_i, int n_threads); int thread_i, int n_threads);
// Returns true iff the benchmark should continue through another iteration. // Returns true if the benchmark should continue through another iteration.
// NOTE: A benchmark may not return from the test until KeepRunning() has // NOTE: A benchmark may not return from the test until KeepRunning() has
// returned false. // returned false.
bool KeepRunning() { bool KeepRunning() {
......
...@@ -156,11 +156,11 @@ private: ...@@ -156,11 +156,11 @@ private:
// Simple reporter that outputs benchmark data to the console. This is the // Simple reporter that outputs benchmark data to the console. This is the
// default reporter used by RunSpecifiedBenchmarks(). // default reporter used by RunSpecifiedBenchmarks().
class ConsoleReporter : public BenchmarkReporter { class ConsoleReporter : public BenchmarkReporter {
public: public:
virtual bool ReportContext(const Context& context); virtual bool ReportContext(const Context& context);
virtual void ReportRuns(const std::vector<Run>& reports); virtual void ReportRuns(const std::vector<Run>& reports);
protected: protected:
virtual void PrintRunData(const Run& report); virtual void PrintRunData(const Run& report);
size_t name_field_width_; size_t name_field_width_;
......
...@@ -964,9 +964,9 @@ void State::SetLabel(const char* label) { ...@@ -964,9 +964,9 @@ void State::SetLabel(const char* label) {
} }
namespace internal { namespace internal {
namespace { namespace {
void RunMatchingBenchmarks(const std::vector<Benchmark::Instance>& benchmarks, void RunMatchingBenchmarks(const std::vector<Benchmark::Instance>& benchmarks,
BenchmarkReporter* reporter) { BenchmarkReporter* reporter) {
CHECK(reporter != nullptr); CHECK(reporter != nullptr);
...@@ -997,9 +997,9 @@ namespace internal { ...@@ -997,9 +997,9 @@ namespace internal {
RunBenchmark(benchmark, reporter, complexity_reports); RunBenchmark(benchmark, reporter, complexity_reports);
} }
} }
} }
std::unique_ptr<BenchmarkReporter> GetDefaultReporter() { std::unique_ptr<BenchmarkReporter> GetDefaultReporter() {
typedef std::unique_ptr<BenchmarkReporter> PtrType; typedef std::unique_ptr<BenchmarkReporter> PtrType;
if (FLAGS_benchmark_format == "console") { if (FLAGS_benchmark_format == "console") {
return PtrType(new ConsoleReporter); return PtrType(new ConsoleReporter);
...@@ -1011,9 +1011,9 @@ namespace internal { ...@@ -1011,9 +1011,9 @@ namespace internal {
std::cerr << "Unexpected format: '" << FLAGS_benchmark_format << "'\n"; std::cerr << "Unexpected format: '" << FLAGS_benchmark_format << "'\n";
std::exit(1); std::exit(1);
} }
} }
} // end namespace } // end namespace
} // end namespace internal } // end namespace internal
size_t RunSpecifiedBenchmarks() { size_t RunSpecifiedBenchmarks() {
......
...@@ -26,15 +26,15 @@ ...@@ -26,15 +26,15 @@
namespace benchmark { namespace benchmark {
// Return a vector containing the mean and standard devation information for // Return a vector containing the mean and standard devation information for
// the specified list of reports. If 'reports' contains less than two // the specified list of reports. If 'reports' contains less than two
// non-errored runs an empty vector is returned // non-errored runs an empty vector is returned
std::vector<BenchmarkReporter::Run> ComputeStats( std::vector<BenchmarkReporter::Run> ComputeStats(
const std::vector<BenchmarkReporter::Run>& reports); const std::vector<BenchmarkReporter::Run>& reports);
// Return a vector containing the bigO and RMS information for the specified // Return a vector containing the bigO and RMS information for the specified
// list of reports. If 'reports.size() < 2' an empty vector is returned. // list of reports. If 'reports.size() < 2' an empty vector is returned.
std::vector<BenchmarkReporter::Run> ComputeBigO( std::vector<BenchmarkReporter::Run> ComputeBigO(
const std::vector<BenchmarkReporter::Run>& reports); const std::vector<BenchmarkReporter::Run>& reports);
// This data structure will contain the result returned by MinimalLeastSq // This data structure will contain the result returned by MinimalLeastSq
......
...@@ -155,7 +155,7 @@ void JSONReporter::PrintRunData(Run const& run) { ...@@ -155,7 +155,7 @@ void JSONReporter::PrintRunData(Run const& run) {
} else if(run.report_rms) { } else if(run.report_rms) {
out << indent out << indent
<< FormatKV("rms", RoundDouble(run.GetAdjustedCPUTime()*100)) << FormatKV("rms", RoundDouble(run.GetAdjustedCPUTime()*100))
<< "%"; << '%';
} }
if (run.bytes_per_second > 0.0) { if (run.bytes_per_second > 0.0) {
out << ",\n" << indent out << ",\n" << indent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment