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
66747446
Commit
66747446
authored
Mar 31, 2015
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #111 from google/buildtype_log
Clarify build type warning
parents
006d23cc
25e46848
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
console_reporter.cc
src/console_reporter.cc
+5
-8
csv_reporter.cc
src/csv_reporter.cc
+2
-1
json_reporter.cc
src/json_reporter.cc
+2
-3
No files found.
src/console_reporter.cc
View file @
66747446
...
@@ -41,16 +41,13 @@ bool ConsoleReporter::ReportContext(const Context& context) {
...
@@ -41,16 +41,13 @@ bool ConsoleReporter::ReportContext(const Context& context) {
}
}
#ifndef NDEBUG
#ifndef NDEBUG
std
::
cerr
<<
"Build Type: DEBUG
\n
"
;
std
::
cerr
<<
"***WARNING*** Library was built as DEBUG. Timings may be "
"affected.
\n
"
;
#endif
#endif
int
output_width
=
int
output_width
=
fprintf
(
stdout
,
"%-*s %10s %10s %10s
\n
"
,
fprintf
(
stdout
,
static_cast
<
int
>
(
name_field_width_
),
"Benchmark"
,
"%-*s %10s %10s %10s
\n
"
,
"Time(ns)"
,
"CPU(ns)"
,
"Iterations"
);
static_cast
<
int
>
(
name_field_width_
),
"Benchmark"
,
"Time(ns)"
,
"CPU(ns)"
,
"Iterations"
);
std
::
cout
<<
std
::
string
(
output_width
-
1
,
'-'
)
<<
"
\n
"
;
std
::
cout
<<
std
::
string
(
output_width
-
1
,
'-'
)
<<
"
\n
"
;
return
true
;
return
true
;
...
...
src/csv_reporter.cc
View file @
66747446
...
@@ -39,7 +39,8 @@ bool CSVReporter::ReportContext(const Context& context) {
...
@@ -39,7 +39,8 @@ bool CSVReporter::ReportContext(const Context& context) {
}
}
#ifndef NDEBUG
#ifndef NDEBUG
std
::
cerr
<<
"Build Type: DEBUG
\n
"
;
std
::
cerr
<<
"***WARNING*** Library was built as DEBUG. Timings may be "
"affected.
\n
"
;
#endif
#endif
std
::
cout
<<
"name,iterations,real_time,cpu_time,bytes_per_second,"
std
::
cout
<<
"name,iterations,real_time,cpu_time,bytes_per_second,"
"items_per_second,label
\n
"
;
"items_per_second,label
\n
"
;
...
...
src/json_reporter.cc
View file @
66747446
...
@@ -84,7 +84,7 @@ bool JSONReporter::ReportContext(const Context& context) {
...
@@ -84,7 +84,7 @@ bool JSONReporter::ReportContext(const Context& context) {
#else
#else
const
char
build_type
[]
=
"debug"
;
const
char
build_type
[]
=
"debug"
;
#endif
#endif
out
<<
indent
<<
FormatKV
(
"build_type"
,
build_type
)
<<
"
\n
"
;
out
<<
indent
<<
FormatKV
(
"
library_
build_type"
,
build_type
)
<<
"
\n
"
;
// Close context block and open the list of benchmarks.
// Close context block and open the list of benchmarks.
out
<<
inner_indent
<<
"},
\n
"
;
out
<<
inner_indent
<<
"},
\n
"
;
out
<<
inner_indent
<<
"
\"
benchmarks
\"
: [
\n
"
;
out
<<
inner_indent
<<
"
\"
benchmarks
\"
: [
\n
"
;
...
@@ -162,4 +162,4 @@ void JSONReporter::PrintRunData(Run const& run) {
...
@@ -162,4 +162,4 @@ void JSONReporter::PrintRunData(Run const& run) {
out
<<
'\n'
;
out
<<
'\n'
;
}
}
}
// end namespace benchmark
}
// end namespace benchmark
\ No newline at end of file
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