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
5833c1de
Commit
5833c1de
authored
Jun 01, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned bench source folder
parent
4b9949de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
37 deletions
+1
-37
bench/Makefile
bench/Makefile
+1
-2
bench/spdlog-bench.cpp
bench/spdlog-bench.cpp
+0
-35
No files found.
bench/Makefile
View file @
5833c1de
...
@@ -14,7 +14,6 @@ spdlog-null-async: spdlog-null-async.cpp
...
@@ -14,7 +14,6 @@ spdlog-null-async: spdlog-null-async.cpp
$(CXX)
spdlog-null-async.cpp
-o
spdlog-null-async
$(CXXFLAGS)
$(CXX_RELEASE_FLAGS)
$(CXX)
spdlog-null-async.cpp
-o
spdlog-null-async
$(CXXFLAGS)
$(CXX_RELEASE_FLAGS)
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
...
...
bench/spdlog-bench.cpp
deleted
100644 → 0
View file @
4b9949de
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
#include <chrono>
#include <iostream>
#include "spdlog/sinks/simple_file_sink.h"
#include "spdlog/spdlog.h"
int
main
(
int
,
char
*
[])
{
using
namespace
std
::
chrono
;
using
clock
=
steady_clock
;
int
howmany
=
1000000
;
auto
logger
=
spdlog
::
create
<
spdlog
::
sinks
::
simple_file_sink_st
>
(
"file_logger"
,
"logs/spdlog-bench.log"
,
false
);
logger
->
set_pattern
(
"[%Y-%m-%d %T.%F]: %L %v"
);
auto
start
=
clock
::
now
();
for
(
int
i
=
0
;
i
<
howmany
;
++
i
)
logger
->
info
(
"spdlog message #{} : This is some text for your pleasure"
,
i
);
duration
<
float
>
delta
=
clock
::
now
()
-
start
;
float
deltaf
=
delta
.
count
();
auto
rate
=
howmany
/
deltaf
;
std
::
cout
<<
"Total: "
<<
howmany
<<
std
::
endl
;
std
::
cout
<<
"Delta = "
<<
std
::
fixed
<<
deltaf
<<
" seconds"
<<
std
::
endl
;
std
::
cout
<<
"Rate = "
<<
std
::
fixed
<<
rate
<<
"/sec"
<<
std
::
endl
;
return
0
;
}
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