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
7c428e91
Commit
7c428e91
authored
Jun 04, 2014
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #27 from pleroy/TwoBugs
Two bug fixes in KeepRunning
parents
883413be
0d9a060f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
CONTRIBUTORS
CONTRIBUTORS
+1
-0
benchmark.cc
src/benchmark.cc
+5
-1
No files found.
CONTRIBUTORS
View file @
7c428e91
...
@@ -30,6 +30,7 @@ Dominic Hamon <dma@stripysock.com>
...
@@ -30,6 +30,7 @@ Dominic Hamon <dma@stripysock.com>
Eugene Zhuk <eugene.zhuk@gmail.com>
Eugene Zhuk <eugene.zhuk@gmail.com>
Felix Homann <linuxaudio@showlabor.de>
Felix Homann <linuxaudio@showlabor.de>
Oleksandr Sochka <sasha.sochka@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Pascal Leroy <phl@google.com>
Pierre Phaneuf <pphaneuf@google.com>
Pierre Phaneuf <pphaneuf@google.com>
Shuo Chen <chenshuo@chenshuo.com>
Shuo Chen <chenshuo@chenshuo.com>
Yusuke Suzuki <utatane.tea@gmail.com>
Yusuke Suzuki <utatane.tea@gmail.com>
src/benchmark.cc
View file @
7c428e91
...
@@ -955,7 +955,8 @@ State::State(FastClock* clock, SharedState* s, int t)
...
@@ -955,7 +955,8 @@ State::State(FastClock* clock, SharedState* s, int t)
bool
State
::
KeepRunning
()
{
bool
State
::
KeepRunning
()
{
// Fast path
// Fast path
if
((
FLAGS_benchmark_iterations
==
0
&&
if
((
FLAGS_benchmark_iterations
==
0
&&
!
clock_
->
HasReached
(
stop_time_micros_
+
pause_time_
))
||
!
clock_
->
HasReached
(
stop_time_micros_
+
kNumMicrosPerSecond
*
pause_time_
))
||
iterations_
<
FLAGS_benchmark_iterations
)
{
iterations_
<
FLAGS_benchmark_iterations
)
{
++
iterations_
;
++
iterations_
;
return
true
;
return
true
;
...
@@ -996,6 +997,9 @@ bool State::KeepRunning() {
...
@@ -996,6 +997,9 @@ bool State::KeepRunning() {
}
}
}
}
if
(
ret
)
{
++
iterations_
;
}
return
ret
;
return
ret
;
}
}
...
...
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