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
fcf8860e
Commit
fcf8860e
authored
Sep 23, 2015
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #140 from eliben/fix-custom-arguments-return
Fix documentation comment in benchmark_api.h w.r.t CustomArguments
parents
63192525
1dd40c99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
benchmark_api.h
include/benchmark/benchmark_api.h
+1
-2
options_test.cc
test/options_test.cc
+8
-0
No files found.
include/benchmark/benchmark_api.h
View file @
fcf8860e
...
@@ -90,8 +90,7 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10, 8<<10, 1, 512);
...
@@ -90,8 +90,7 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10, 8<<10, 1, 512);
static void CustomArguments(benchmark::internal::Benchmark* b) {
static void CustomArguments(benchmark::internal::Benchmark* b) {
for (int i = 0; i <= 10; ++i)
for (int i = 0; i <= 10; ++i)
for (int j = 32; j <= 1024*1024; j *= 8)
for (int j = 32; j <= 1024*1024; j *= 8)
b = b->ArgPair(i, j);
b->ArgPair(i, j);
return b;
}
}
BENCHMARK(BM_SetInsert)->Apply(CustomArguments);
BENCHMARK(BM_SetInsert)->Apply(CustomArguments);
...
...
test/options_test.cc
View file @
fcf8860e
...
@@ -15,4 +15,12 @@ BENCHMARK(BM_basic)->UseRealTime();
...
@@ -15,4 +15,12 @@ BENCHMARK(BM_basic)->UseRealTime();
BENCHMARK
(
BM_basic
)
->
ThreadRange
(
2
,
4
);
BENCHMARK
(
BM_basic
)
->
ThreadRange
(
2
,
4
);
BENCHMARK
(
BM_basic
)
->
ThreadPerCpu
();
BENCHMARK
(
BM_basic
)
->
ThreadPerCpu
();
void
CustomArgs
(
benchmark
::
internal
::
Benchmark
*
b
)
{
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
b
->
Arg
(
i
);
}
}
BENCHMARK
(
BM_basic
)
->
Apply
(
CustomArgs
);
BENCHMARK_MAIN
()
BENCHMARK_MAIN
()
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