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
2aca242b
Commit
2aca242b
authored
Sep 28, 2016
by
Eric Fiselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix various uninitialized members
parent
6cadcf7f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
15 deletions
+12
-15
reporter.h
include/benchmark/reporter.h
+2
-1
benchmark.cc
src/benchmark.cc
+7
-11
benchmark_register.cc
src/benchmark_register.cc
+2
-2
timers.cc
src/timers.cc
+1
-1
No files found.
include/benchmark/reporter.h
View file @
2aca242b
...
...
@@ -51,6 +51,7 @@ class BenchmarkReporter {
items_per_second
(
0
),
max_heapbytes_used
(
0
),
complexity
(
oNone
),
complexity_lambda
(),
complexity_n
(
0
),
report_big_o
(
false
),
report_rms
(
false
)
{}
...
...
@@ -162,7 +163,7 @@ public:
OO_Color
};
explicit
ConsoleReporter
(
OutputOptions
color_output
=
OO_Color
)
:
color_output_
(
color_output
==
OO_Color
)
{}
:
name_field_width_
(
0
),
color_output_
(
color_output
==
OO_Color
)
{}
virtual
bool
ReportContext
(
const
Context
&
context
);
virtual
void
ReportRuns
(
const
std
::
vector
<
Run
>&
reports
);
...
...
src/benchmark.cc
View file @
2aca242b
...
...
@@ -161,11 +161,7 @@ class ThreadManager {
// Timer management class
class
ThreadTimer
{
public
:
ThreadTimer
()
:
running_
(
false
),
real_time_used_
(
0
),
cpu_time_used_
(
0
),
manual_time_used_
(
0
)
{}
ThreadTimer
()
=
default
;
// Called by each thread
void
StartTimer
()
{
...
...
@@ -206,15 +202,15 @@ class ThreadTimer {
}
private
:
bool
running_
;
// Is the timer running
double
start_real_time_
;
// If running_
double
start_cpu_time_
;
// If running_
bool
running_
=
false
;
// Is the timer running
double
start_real_time_
=
0
;
// If running_
double
start_cpu_time_
=
0
;
// If running_
// Accumulated time so far (does not contain current slice if running_)
double
real_time_used_
;
double
cpu_time_used_
;
double
real_time_used_
=
0
;
double
cpu_time_used_
=
0
;
// Manually set iteration time. User sets this with SetIterationTime(seconds).
double
manual_time_used_
;
double
manual_time_used_
=
0
;
};
...
...
src/benchmark_register.cc
View file @
2aca242b
...
...
@@ -209,8 +209,8 @@ bool FindBenchmarksInternal(const std::string& re,
Benchmark
::
Benchmark
(
const
char
*
name
)
:
name_
(
name
),
report_mode_
(
RM_Unspecified
),
time_unit_
(
kNanosecond
),
range_multiplier_
(
kRangeMultiplier
),
min_time_
(
0
),
repetitions_
(
0
),
use_real_time_
(
false
),
use_manual_time_
(
false
),
complexity_
(
oNone
)
min_time_
(
0
),
repetitions_
(
0
),
use_real_time_
(
false
),
use_manual_time_
(
false
),
complexity_
(
oNone
),
complexity_lambda_
(
nullptr
)
{
}
...
...
src/timers.cc
View file @
2aca242b
...
...
@@ -71,7 +71,7 @@ double MakeTime(FILETIME const& kernel_time, FILETIME const& user_time) {
1e-7
;
}
#else
double
MakeTime
(
struct
rusage
ru
)
{
double
MakeTime
(
struct
rusage
const
&
ru
)
{
return
(
static_cast
<
double
>
(
ru
.
ru_utime
.
tv_sec
)
+
static_cast
<
double
>
(
ru
.
ru_utime
.
tv_usec
)
*
1e-6
+
static_cast
<
double
>
(
ru
.
ru_stime
.
tv_sec
)
+
...
...
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