Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
1c7b3e4e
Commit
1c7b3e4e
authored
Nov 01, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bench
parent
567e85e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
bench.cpp
example/bench.cpp
+2
-9
example.cpp
example/example.cpp
+1
-1
No files found.
example/bench.cpp
View file @
1c7b3e4e
...
...
@@ -26,7 +26,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count
int
main
(
int
argc
,
char
*
argv
[])
{
int
howmany
=
123456
;
int
howmany
=
250000
;
int
threads
=
4
;
int
flush_interval
=
1000
;
int
file_size
=
30
*
1024
*
1024
;
...
...
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
auto
daily_st
=
spdlog
::
daily_logger_st
(
"daily_st"
,
"logs/daily_st"
,
flush_interval
);
bench
(
howmany
,
daily_st
);
bench
(
howmany
,
spdlog
::
create
<
null_sink_st
>
(
"null_st"
));
cout
<<
"
\n
*******************************************************************************
\n
"
;
...
...
@@ -63,13 +63,6 @@ int main(int argc, char* argv[])
auto
daily_mt
=
spdlog
::
daily_logger_mt
(
"daily_mt"
,
"logs/daily_mt"
,
flush_interval
);
bench_mt
(
howmany
,
daily_mt
,
threads
);
auto
async_sink
=
std
::
make_shared
<
sinks
::
async_sink
>
(
1000
);
auto
file_sink
=
std
::
make_shared
<
sinks
::
rotating_file_sink_mt
>
(
"logs/async_logger"
,
"txt"
,
file_size
,
rotating_files
,
flush_interval
);
async_sink
->
add_sink
(
file_sink
);
auto
async_logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
"async_logger"
,
async_sink
);
bench_mt
(
howmany
,
async_logger
,
threads
);
bench_mt
(
howmany
,
spdlog
::
create
<
null_sink_mt
>
(
"null_mt"
),
threads
);
}
catch
(
std
::
exception
&
ex
)
...
...
example/example.cpp
View file @
1c7b3e4e
...
...
@@ -6,7 +6,7 @@
#include "spdlog/spdlog.h"
int
main
_
(
int
,
char
*
[])
int
main
(
int
,
char
*
[])
{
namespace
spd
=
spdlog
;
...
...
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