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
9934396e
Commit
9934396e
authored
Apr 01, 2015
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing paranthesis and documentation
parent
738bd82b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
README.md
README.md
+11
-6
console_reporter.cc
src/console_reporter.cc
+1
-1
csv_reporter.cc
src/csv_reporter.cc
+1
-1
No files found.
README.md
View file @
9934396e
...
@@ -182,13 +182,10 @@ The library supports multiple output formats. Use the
...
@@ -182,13 +182,10 @@ The library supports multiple output formats. Use the
`--benchmark_format=<tabular|json>` flag to set the format type. `tabular` is
`--benchmark_format=<tabular|json>` flag to set the format type. `tabular` is
the default format.
the default format.
The Tabular format is intended to be a human readable
The Tabular format is intended to be a human readable
format. By default
format. By default the format generates color output. Example tabular output
the format generates color output. Context is output on stderr and the
looks like:
tabular data on stdout. Example tabular output
looks like:
```
```
Run on (40 X 2801 MHz CPUs)
2015/03/17-18:35:54
Build Type: DEBUG
Benchmark Time(ns) CPU(ns) Iterations
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------------------------
----------------------------------------------------------------------
BM_SetInsert/1024/1 28928 29349 23853 133.097kB/s 33.2742k items/s
BM_SetInsert/1024/1 28928 29349 23853 133.097kB/s 33.2742k items/s
...
@@ -239,6 +236,14 @@ output looks like:
...
@@ -239,6 +236,14 @@ output looks like:
}
}
```
```
The CSV format outputs comma-separated values. The `context` is output on stderr
and the CSV itself on stdout. Example CSV output looks like:
```
name,iterations,real_time,cpu_time,bytes_per_second,items_per_second,label
"BM_SetInsert/1024/1",65465,17890.7,8407.45,475768,118942,
"BM_SetInsert/1024/8",116606,18810.1,9766.64,3.27646e+06,819115,
"BM_SetInsert/1024/10",106365,17238.4,8421.53,4.74973e+06,1.18743e+06,
```
Linking against the library
Linking against the library
---------------------------
---------------------------
...
...
src/console_reporter.cc
View file @
9934396e
...
@@ -30,7 +30,7 @@ bool ConsoleReporter::ReportContext(const Context& context) {
...
@@ -30,7 +30,7 @@ bool ConsoleReporter::ReportContext(const Context& context) {
name_field_width_
=
context
.
name_field_width
;
name_field_width_
=
context
.
name_field_width
;
std
::
cerr
<<
"Run on ("
<<
context
.
num_cpus
<<
" X "
<<
context
.
mhz_per_cpu
std
::
cerr
<<
"Run on ("
<<
context
.
num_cpus
<<
" X "
<<
context
.
mhz_per_cpu
<<
" MHz CPU "
<<
((
context
.
num_cpus
>
1
)
?
"s"
:
""
)
<<
"
\n
"
;
<<
" MHz CPU "
<<
((
context
.
num_cpus
>
1
)
?
"s"
:
""
)
<<
"
)
\n
"
;
std
::
cerr
<<
LocalDateTimeString
()
<<
"
\n
"
;
std
::
cerr
<<
LocalDateTimeString
()
<<
"
\n
"
;
...
...
src/csv_reporter.cc
View file @
9934396e
...
@@ -28,7 +28,7 @@ namespace benchmark {
...
@@ -28,7 +28,7 @@ namespace benchmark {
bool
CSVReporter
::
ReportContext
(
const
Context
&
context
)
{
bool
CSVReporter
::
ReportContext
(
const
Context
&
context
)
{
std
::
cerr
<<
"Run on ("
<<
context
.
num_cpus
<<
" X "
<<
context
.
mhz_per_cpu
std
::
cerr
<<
"Run on ("
<<
context
.
num_cpus
<<
" X "
<<
context
.
mhz_per_cpu
<<
" MHz CPU "
<<
((
context
.
num_cpus
>
1
)
?
"s"
:
""
)
<<
"
\n
"
;
<<
" MHz CPU "
<<
((
context
.
num_cpus
>
1
)
?
"s"
:
""
)
<<
"
)
\n
"
;
std
::
cerr
<<
LocalDateTimeString
()
<<
"
\n
"
;
std
::
cerr
<<
LocalDateTimeString
()
<<
"
\n
"
;
...
...
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