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
03f0e219
Commit
03f0e219
authored
Jun 06, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix async bench under msvc
parent
a33de607
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
bench/async_bench.cpp
bench/async_bench.cpp
+13
-0
No files found.
bench/async_bench.cpp
View file @
03f0e219
...
...
@@ -26,6 +26,11 @@ using namespace utils;
void
bench_mt
(
int
howmany
,
std
::
shared_ptr
<
spdlog
::
logger
>
log
,
int
thread_count
);
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4996) //disable fopen warning under msvc
#endif // _MSC_VER
int
count_lines
(
const
char
*
filename
)
{
int
counter
=
0
;
...
...
@@ -40,6 +45,11 @@ int count_lines(const char *filename)
return
counter
;
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -148,3 +158,6 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co
auto
delta_d
=
duration_cast
<
duration
<
double
>>
(
delta
).
count
();
spdlog
::
info
(
"Elapsed: {} secs
\t
{:n}/sec"
,
delta_d
,
int
(
howmany
/
delta_d
));
}
async_bench
.
cpp
Displaying
async_bench
.
cpp
.
\ No newline at end of file
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