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
c56fae39
Commit
c56fae39
authored
Nov 24, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bench small change
parent
7f043452
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
bench/spdlog-bench.cpp
bench/spdlog-bench.cpp
+0
-1
example/bench.cpp
example/bench.cpp
+5
-9
No files found.
bench/spdlog-bench.cpp
View file @
c56fae39
...
...
@@ -12,6 +12,5 @@ int main(int, char* [])
logger
->
set_pattern
(
"[%Y-%b-%d %T.%e]: %v"
);
for
(
int
i
=
0
;
i
<
howmany
;
++
i
)
logger
->
info
()
<<
"spdlog message #"
<<
i
<<
": This is some text for your pleasure"
;
return
0
;
}
example/bench.cpp
View file @
c56fae39
...
...
@@ -86,22 +86,18 @@ int main(int argc, char* argv[])
bench_mt
(
howmany
,
daily_mt
,
threads
);
bench
(
howmany
,
spdlog
::
create
<
null_sink_st
>
(
"null_mt"
));
cout
<<
"
\n
*******************************************************************************
\n
"
;
cout
<<
"async logging.. "
<<
threads
<<
" threads sharing same logger, "
<<
format
(
howmany
)
<<
" iterations, flush every "
<<
flush_interval
<<
" lines"
<<
endl
;
cout
<<
"*******************************************************************************
\n
"
;
spdlog
::
set_async_mode
(
howmany
);
auto
rotating_st_async
=
spdlog
::
rotating_logger_st
(
"rotating_
st_Async"
,
"logs/rotating_st
_async"
,
file_size
,
rotating_files
,
flush_interval
);
auto
rotating_st_async
=
spdlog
::
rotating_logger_st
(
"rotating_
async"
,
"logs/rotating
_async"
,
file_size
,
rotating_files
,
flush_interval
);
bench
(
howmany
,
rotating_st_async
);
auto
daily_st_async
=
spdlog
::
daily_logger_st
(
"daily_
st_async"
,
"logs/daily_st
_async"
,
flush_interval
);
auto
daily_st_async
=
spdlog
::
daily_logger_st
(
"daily_
async"
,
"logs/daily
_async"
,
flush_interval
);
bench
(
howmany
,
daily_st_async
);
bench
(
howmany
,
spdlog
::
create
<
null_sink_st
>
(
"null_st_async"
));
bench
(
howmany
,
spdlog
::
create
<
null_sink_st
>
(
"null_async"
));
spdlog
::
stop
();
cin
.
ignore
();
}
catch
(
std
::
exception
&
ex
)
...
...
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