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
924b8cee
Commit
924b8cee
authored
May 24, 2016
by
Eric Fiselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflow some wording. NFC
parent
bdeb3871
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
README.md
README.md
+6
-5
benchmark_api.h
include/benchmark/benchmark_api.h
+5
-5
No files found.
README.md
View file @
924b8cee
...
@@ -311,11 +311,12 @@ BENCHMARK_REGISTER_F(MyFixture, BarTest)->Threads(2);
...
@@ -311,11 +311,12 @@ BENCHMARK_REGISTER_F(MyFixture, BarTest)->Threads(2);
## Exiting Benchmarks in Error
## Exiting Benchmarks in Error
When external influences such as file I/O and network errors occur within
When errors caused by external influences, such as file I/O and network
a benchmark the
`State::SkipWithError(const char* msg)`
function can be used
communication, occur within a benchmark the
to skip that run of benchmark and report the error. Note that only future
`State::SkipWithError(const char* msg)`
function can be used to skip that run
iterations of the
`KeepRunning()`
are skipped. Users may explicitly return
of benchmark and report the error. Note that only future iterations of the
to exit the benchmark immediately.
`KeepRunning()`
are skipped. Users may explicitly return to exit the
benchmark immediately.
The
`SkipWithError(...)`
function may be used at any point within the benchmark,
The
`SkipWithError(...)`
function may be used at any point within the benchmark,
including before and after the
`KeepRunning()`
loop.
including before and after the
`KeepRunning()`
loop.
...
...
include/benchmark/benchmark_api.h
View file @
924b8cee
...
@@ -269,7 +269,7 @@ public:
...
@@ -269,7 +269,7 @@ public:
}
}
// REQUIRES: timer is running and 'SkipWithError(...)' has not been called
// REQUIRES: timer is running and 'SkipWithError(...)' has not been called
//
in
the current thread.
//
by
the current thread.
// Stop the benchmark timer. If not called, the timer will be
// Stop the benchmark timer. If not called, the timer will be
// automatically stopped after KeepRunning() returns false for the first time.
// automatically stopped after KeepRunning() returns false for the first time.
//
//
...
@@ -284,7 +284,7 @@ public:
...
@@ -284,7 +284,7 @@ public:
void
PauseTiming
();
void
PauseTiming
();
// REQUIRES: timer is not running and 'SkipWithError(...)' has not been called
// REQUIRES: timer is not running and 'SkipWithError(...)' has not been called
//
in
the current thread.
//
by
the current thread.
// Start the benchmark timer. The timer is NOT running on entrance to the
// Start the benchmark timer. The timer is NOT running on entrance to the
// benchmark function. It begins running after the first call to KeepRunning()
// benchmark function. It begins running after the first call to KeepRunning()
//
//
...
@@ -298,15 +298,15 @@ public:
...
@@ -298,15 +298,15 @@ public:
// within each benchmark iteration, if possible.
// within each benchmark iteration, if possible.
void
ResumeTiming
();
void
ResumeTiming
();
// REQUIRES: 'SkipWithError(...)' has not been called previously
in
the
// REQUIRES: 'SkipWithError(...)' has not been called previously
by
the
// current thread.
// current thread.
// Skip any future iterations of the 'KeepRunning()' loop in the current
// Skip any future iterations of the 'KeepRunning()' loop in the current
// thread and report an error with the specified 'msg'. After this call
// thread and report an error with the specified 'msg'. After this call
// the user may explicitly 'return' from the benchmark.
// the user may explicitly 'return' from the benchmark.
//
//
// For threaded benchmarks only the current thread stops executing. If
// For threaded benchmarks only the current thread stops executing. If
// multiple threads report an error only the first error message
will be
used.
// multiple threads report an error only the first error message
is
used.
// The current thread is no longer considered 'active'
thread
by
// The current thread is no longer considered 'active' by
// 'PauseTiming()' and 'ResumingTiming()'.
// 'PauseTiming()' and 'ResumingTiming()'.
//
//
// NOTE: Calling 'SkipWithError(...)' does not cause the benchmark to exit
// NOTE: Calling 'SkipWithError(...)' does not cause the benchmark to exit
...
...
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