Commit 577f7410 by Dominic Hamon

Explicitly remove unsupported memory usage support

parent dc5b533a
...@@ -158,13 +158,14 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter = nullptr); ...@@ -158,13 +158,14 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter = nullptr);
// //
// REQUIRES: a benchmark is currently executing // REQUIRES: a benchmark is currently executing
extern void SetLabel(const std::string& label); void SetLabel(const std::string& label);
// If this routine is called, peak memory allocation past this point in the // If this routine is called, peak memory allocation past this point in the
// benchmark is reported at the end of the benchmark report line. (It is // benchmark is reported at the end of the benchmark report line. (It is
// computed by running the benchmark once with a single iteration and a memory // computed by running the benchmark once with a single iteration and a memory
// tracer.) // tracer.)
extern void MemoryUsage(); // TODO(dominic)
//void MemoryUsage();
// If a particular benchmark is I/O bound, or if for some reason CPU // If a particular benchmark is I/O bound, or if for some reason CPU
// timings are not representative, call this method from within the // timings are not representative, call this method from within the
...@@ -172,7 +173,7 @@ extern void MemoryUsage(); ...@@ -172,7 +173,7 @@ extern void MemoryUsage();
// control how many iterations are run, and in the printing of // control how many iterations are run, and in the printing of
// items/second or MB/seconds values. If not called, the cpu time // items/second or MB/seconds values. If not called, the cpu time
// used by the benchmark will be used. // used by the benchmark will be used.
extern void UseRealTime(); void UseRealTime();
namespace internal { namespace internal {
class Benchmark; class Benchmark;
...@@ -436,8 +437,6 @@ class Benchmark { ...@@ -436,8 +437,6 @@ class Benchmark {
// Equivalent to ThreadRange(NumCPUs(), NumCPUs()) // Equivalent to ThreadRange(NumCPUs(), NumCPUs())
Benchmark* ThreadPerCpu(); Benchmark* ThreadPerCpu();
// TODO(dominic): Control whether or not real-time is used for this benchmark
// ------------------------------- // -------------------------------
// Following methods are not useful for clients // Following methods are not useful for clients
......
...@@ -373,13 +373,14 @@ void ConsoleReporter::PrintRunData(const BenchmarkReporter::Run& result) const { ...@@ -373,13 +373,14 @@ void ConsoleReporter::PrintRunData(const BenchmarkReporter::Run& result) const {
(result.cpu_accumulated_time * 1e9) / (result.cpu_accumulated_time * 1e9) /
(static_cast<double>(result.iterations))); (static_cast<double>(result.iterations)));
ColorPrintf(COLOR_CYAN, "%10lld", result.iterations); ColorPrintf(COLOR_CYAN, "%10lld", result.iterations);
ColorPrintf(COLOR_DEFAULT, "%*s %*s %s%s\n", ColorPrintf(COLOR_DEFAULT, "%*s %*s %s %s\n",
16, rate.c_str(), 13, rate.c_str(),
18, items.c_str(), 18, items.c_str(),
result.report_label.c_str(), result.report_label.c_str(),
PrintMemoryUsage(result.max_heapbytes_used).c_str()); PrintMemoryUsage(result.max_heapbytes_used).c_str());
} }
/* TODO(dominic)
void MemoryUsage() { void MemoryUsage() {
//if (benchmark_mc) { //if (benchmark_mc) {
// benchmark_mc->Reset(); // benchmark_mc->Reset();
...@@ -387,6 +388,7 @@ void MemoryUsage() { ...@@ -387,6 +388,7 @@ void MemoryUsage() {
get_memory_usage = true; get_memory_usage = true;
//} //}
} }
*/
void UseRealTime() { void UseRealTime() {
use_real_time = true; use_real_time = true;
......
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