Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
577f7410
Commit
577f7410
authored
Jan 08, 2014
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly remove unsupported memory usage support
parent
dc5b533a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
benchmark.h
include/benchmark/benchmark.h
+4
-5
benchmark.cc
src/benchmark.cc
+4
-2
No files found.
include/benchmark/benchmark.h
View file @
577f7410
...
@@ -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
...
...
src/benchmark.cc
View file @
577f7410
...
@@ -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
"
,
1
6
,
rate
.
c_str
(),
1
3
,
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment