Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
7a10e319
Unverified
Commit
7a10e319
authored
Feb 24, 2021
by
Máté Ferenc Nagy-Egri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid relying on function name decay mechanics
parent
de0dbfa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bench/formatter-bench.cpp
bench/formatter-bench.cpp
+5
-5
No files found.
bench/formatter-bench.cpp
View file @
7a10e319
...
...
@@ -34,14 +34,14 @@ void bench_formatters()
for
(
auto
&
flag
:
all_flags
)
{
auto
pattern
=
std
::
string
(
"%"
)
+
flag
;
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
bench_formatter
,
pattern
);
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
&
bench_formatter
,
pattern
);
// pattern = std::string("%16") + flag;
// benchmark::RegisterBenchmark(pattern.c_str(), bench_formatter, pattern);
// benchmark::RegisterBenchmark(pattern.c_str(),
&
bench_formatter, pattern);
//
// // bench center padding
// pattern = std::string("%=16") + flag;
// benchmark::RegisterBenchmark(pattern.c_str(), bench_formatter, pattern);
// benchmark::RegisterBenchmark(pattern.c_str(),
&
bench_formatter, pattern);
}
// complex patterns
...
...
@@ -52,7 +52,7 @@ void bench_formatters()
};
for
(
auto
&
pattern
:
patterns
)
{
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
bench_formatter
,
pattern
)
->
Iterations
(
2500000
);
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
&
bench_formatter
,
pattern
)
->
Iterations
(
2500000
);
}
}
...
...
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
}
else
{
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
bench_formatter
,
pattern
);
benchmark
::
RegisterBenchmark
(
pattern
.
c_str
(),
&
bench_formatter
,
pattern
);
}
benchmark
::
Initialize
(
&
argc
,
argv
);
benchmark
::
RunSpecifiedBenchmarks
();
...
...
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