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
e0a080d0
Unverified
Commit
e0a080d0
authored
Jun 02, 2021
by
Roman Lebedev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BenchmarkFamilies::FindBenchmarks(): correctly use std::vector<>::reserve()
It takes the whole total new capacity, not the increase.
parent
a54ef37a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
benchmark_register.cc
src/benchmark_register.cc
+1
-1
No files found.
src/benchmark_register.cc
View file @
e0a080d0
...
@@ -150,7 +150,7 @@ bool BenchmarkFamilies::FindBenchmarks(
...
@@ -150,7 +150,7 @@ bool BenchmarkFamilies::FindBenchmarks(
}
}
// reserve in the special case the regex ".", since we know the final
// reserve in the special case the regex ".", since we know the final
// family size.
// family size.
if
(
spec
==
"."
)
benchmarks
->
reserve
(
family_size
);
if
(
spec
==
"."
)
benchmarks
->
reserve
(
benchmarks
->
size
()
+
family_size
);
for
(
auto
const
&
args
:
family
->
args_
)
{
for
(
auto
const
&
args
:
family
->
args_
)
{
for
(
int
num_threads
:
*
thread_counts
)
{
for
(
int
num_threads
:
*
thread_counts
)
{
...
...
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