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
98e7f89d
Commit
98e7f89d
authored
Apr 17, 2014
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16 from chenshuo/master
Use a new container in each round of push_back test.
parents
54cd4fd8
e474629b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
AUTHORS
AUTHORS
+1
-0
CONTRIBUTORS
CONTRIBUTORS
+1
-0
benchmark_test.cc
test/benchmark_test.cc
+5
-4
No files found.
AUTHORS
View file @
98e7f89d
...
@@ -16,4 +16,5 @@ Eugene Zhuk <eugene.zhuk@gmail.com>
...
@@ -16,4 +16,5 @@ Eugene Zhuk <eugene.zhuk@gmail.com>
Felix Homann <linuxaudio@showlabor.de>
Felix Homann <linuxaudio@showlabor.de>
Google Inc.
Google Inc.
Oleksandr Sochka <sasha.sochka@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Shuo Chen <chenshuo@chenshuo.com>
Yusuke Suzuki <utatane.tea@gmail.com>
Yusuke Suzuki <utatane.tea@gmail.com>
CONTRIBUTORS
View file @
98e7f89d
...
@@ -30,4 +30,5 @@ Eugene Zhuk <eugene.zhuk@gmail.com>
...
@@ -30,4 +30,5 @@ 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>
Pierre Phaneuf <pphaneuf@google.com>
Pierre Phaneuf <pphaneuf@google.com>
Shuo Chen <chenshuo@chenshuo.com>
Yusuke Suzuki <utatane.tea@gmail.com>
Yusuke Suzuki <utatane.tea@gmail.com>
test/benchmark_test.cc
View file @
98e7f89d
...
@@ -86,12 +86,13 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10,8<<10, 1,10);
...
@@ -86,12 +86,13 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10,8<<10, 1,10);
template
<
typename
Q
>
template
<
typename
Q
>
static
void
BM_Sequential
(
benchmark
::
State
&
state
)
{
static
void
BM_Sequential
(
benchmark
::
State
&
state
)
{
Q
q
;
typename
Q
::
value_type
v
=
42
;
typename
Q
::
value_type
v
;
while
(
state
.
KeepRunning
())
{
while
(
state
.
KeepRunning
())
Q
q
;
for
(
int
i
=
state
.
range_x
();
--
i
;
)
for
(
int
i
=
state
.
range_x
();
--
i
;
)
q
.
push_back
(
v
);
q
.
push_back
(
v
);
const
int64_t
items_processed
=
}
const
int64_t
items_processed
=
static_cast
<
int64_t
>
(
state
.
iterations
())
*
state
.
range_x
();
static_cast
<
int64_t
>
(
state
.
iterations
())
*
state
.
range_x
();
state
.
SetItemsProcessed
(
items_processed
);
state
.
SetItemsProcessed
(
items_processed
);
state
.
SetBytesProcessed
(
items_processed
*
sizeof
(
v
));
state
.
SetBytesProcessed
(
items_processed
*
sizeof
(
v
));
...
...
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