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
62b1dd9c
Commit
62b1dd9c
authored
May 01, 2017
by
Joao Paulo Magalhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHECK_BENCHMARK_RESULTS() was too inconspicuous.
parent
3443ac21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
output_test.h
test/output_test.h
+11
-3
No files found.
test/output_test.h
View file @
62b1dd9c
...
@@ -64,6 +64,17 @@ void RunOutputTests(int argc, char* argv[]);
...
@@ -64,6 +64,17 @@ void RunOutputTests(int argc, char* argv[]);
// ------------------------- Results checking ------------------------------ //
// ------------------------- Results checking ------------------------------ //
// ========================================================================= //
// ========================================================================= //
// Call this macro to register a benchmark for checking its results. This
// should be all that's needed. It subscribes a function to check the (CSV)
// results of a benchmark. This is done only after verifying that the output
// strings are really as expected.
// bm_name_pattern: a name or a regex pattern which will be matched against
// all the benchmark names. Matching benchmarks
// will be the subject of a call to checker_function
// checker_function: should be of type ResultsCheckFn (see below)
#define CHECK_BENCHMARK_RESULTS(bm_name_pattern, checker_function) \
size_t CONCAT(dummy, __LINE__) = AddChecker(bm_name_pattern, checker_function)
struct
Results
;
struct
Results
;
typedef
std
::
function
<
void
(
Results
const
&
)
>
ResultsCheckFn
;
typedef
std
::
function
<
void
(
Results
const
&
)
>
ResultsCheckFn
;
...
@@ -176,9 +187,6 @@ T Results::GetAs(const char* entry_name) const {
...
@@ -176,9 +187,6 @@ T Results::GetAs(const char* entry_name) const {
#define CHECK_FLOAT_COUNTER_VALUE(entry, var_name, relationship, value, eps_factor) \
#define CHECK_FLOAT_COUNTER_VALUE(entry, var_name, relationship, value, eps_factor) \
_CHECK_FLOAT_RESULT_VALUE(entry, GetCounterAs, double, var_name, relationship, value, eps_factor)
_CHECK_FLOAT_RESULT_VALUE(entry, GetCounterAs, double, var_name, relationship, value, eps_factor)
#define CHECK_BENCHMARK_RESULTS(bm_name, checker_function) \
size_t CONCAT(dummy, __LINE__) = AddChecker(bm_name, checker_function)
// ========================================================================= //
// ========================================================================= //
// --------------------------- Misc Utilities ------------------------------ //
// --------------------------- Misc Utilities ------------------------------ //
// ========================================================================= //
// ========================================================================= //
...
...
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