mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
updated benchmarks
This commit is contained in:
parent
def6fc62f4
commit
c948f15822
@ -38,9 +38,9 @@ Just copy the files to your build tree and use a C++11 compiler
|
||||
Below are some [benchmarks](bench) comparing the time needed to log 1,000,000 lines to file under Ubuntu 64 bit, Intel i7-4770 CPU @ 3.40GHz:
|
||||
|
||||
|threads|boost log|glog|g2log|spdlog|spdlog<sup>async mode</sup>|
|
||||
|-------|:-------:|:-----:|------:|------:|
|
||||
|1|4.430s|1.115s|3.227s|0.940s|1.574s
|
||||
|10|13.985s|2.027s|3.476s|3.822s|1.972
|
||||
|-------|:-------:|:-----:|------:|------:|------:|
|
||||
|1|4.779s|1.109s|3.155s|0.947s|1.455s
|
||||
|10|15.151ss|3.546s|3.500s|1.549s|2.040s|
|
||||
|
||||
|
||||
|
||||
|
@ -2,32 +2,32 @@ Running benchmakrs (all with 1000,000 writes to the logs folder
|
||||
|
||||
boost-bench (single thread)..
|
||||
|
||||
real 0m4.430s
|
||||
user 0m4.359s
|
||||
sys 0m0.072s
|
||||
real 0m4.779s
|
||||
user 0m4.256s
|
||||
sys 0m0.044s
|
||||
|
||||
|
||||
glog-bench (single thread)..
|
||||
|
||||
real 0m1.115s
|
||||
user 0m0.997s
|
||||
sys 0m0.117s
|
||||
real 0m1.109s
|
||||
user 0m0.967s
|
||||
sys 0m0.140s
|
||||
|
||||
|
||||
g2log-bench (single thread)..
|
||||
|
||||
Exiting, log location: logs/g2log-bench.g2log.20141124-232519.log
|
||||
Exiting, log location: logs/g2log-bench.g2log.20141124-233419.log
|
||||
|
||||
real 0m3.277s
|
||||
user 0m4.189s
|
||||
sys 0m1.021s
|
||||
real 0m3.155s
|
||||
user 0m4.255s
|
||||
sys 0m0.874s
|
||||
|
||||
|
||||
spdlog-bench (single thread)
|
||||
|
||||
real 0m0.940s
|
||||
user 0m0.892s
|
||||
sys 0m0.048s
|
||||
real 0m0.947s
|
||||
user 0m0.914s
|
||||
sys 0m0.032s
|
||||
|
||||
|
||||
------------------------------------
|
||||
@ -35,32 +35,32 @@ Multithreaded benchmarks..
|
||||
------------------------------------
|
||||
boost-bench-mt (10 threads, single logger)..
|
||||
|
||||
real 0m13.985s
|
||||
user 0m35.045s
|
||||
sys 0m7.196s
|
||||
real 0m15.151s
|
||||
user 0m35.555s
|
||||
sys 0m7.453s
|
||||
|
||||
|
||||
glog-bench-mt (10 threads, single logger)..
|
||||
|
||||
real 0m2.027s
|
||||
user 0m5.552s
|
||||
sys 0m6.223s
|
||||
real 0m3.546s
|
||||
user 0m9.836s
|
||||
sys 0m10.985s
|
||||
|
||||
|
||||
g2log-bench-mt (10 threads, single logger)..
|
||||
|
||||
Exiting, log location: logs/g2log-bench-mt.g2log.20141124-232551.log
|
||||
Exiting, log location: logs/g2log-bench-mt.g2log.20141124-233502.log
|
||||
|
||||
real 0m3.476s
|
||||
user 0m7.649s
|
||||
sys 0m1.619s
|
||||
real 0m3.500s
|
||||
user 0m7.671s
|
||||
sys 0m1.646s
|
||||
|
||||
|
||||
spdlog-bench-mt (10 threads, single logger)..
|
||||
|
||||
real 0m3.822s
|
||||
user 0m14.233s
|
||||
sys 0m6.117s
|
||||
real 0m1.549s
|
||||
user 0m6.994s
|
||||
sys 0m2.969s
|
||||
|
||||
|
||||
------------------------------------
|
||||
@ -68,13 +68,13 @@ Async benchmarks..
|
||||
------------------------------------
|
||||
spdlog-bench-async (single thread)..
|
||||
|
||||
real 0m1.574s
|
||||
user 0m2.613s
|
||||
sys 0m0.405s
|
||||
real 0m1.455s
|
||||
user 0m2.381s
|
||||
sys 0m0.417s
|
||||
|
||||
|
||||
spdlog-bench-mt-async (10 threads, single logger)..
|
||||
|
||||
real 0m1.972s
|
||||
user 0m3.965s
|
||||
sys 0m2.747s
|
||||
real 0m2.040s
|
||||
user 0m4.076s
|
||||
sys 0m2.822s
|
||||
|
@ -3,53 +3,61 @@ echo "Running benchmakrs (all with 1000,000 writes to the logs folder"
|
||||
echo
|
||||
echo "boost-bench (single thread).."
|
||||
time ./boost-bench
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "glog-bench (single thread).."
|
||||
time ./glog-bench
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "g2log-bench (single thread).."
|
||||
time ./g2log-bench
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "spdlog-bench (single thread)"
|
||||
time ./spdlog-bench
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
echo "------------------------------------"
|
||||
echo "Multithreaded benchmarks.."
|
||||
echo "------------------------------------"
|
||||
echo "boost-bench-mt (10 threads, single logger)"..
|
||||
time ./boost-bench-mt
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "glog-bench-mt (10 threads, single logger)"..
|
||||
time ./glog-bench-mt
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "g2log-bench-mt (10 threads, single logger)"..
|
||||
time ./g2log-bench-mt
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "spdlog-bench-mt (10 threads, single logger)"..
|
||||
time ./spdlog-bench-mt
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "------------------------------------"
|
||||
echo "Async benchmarks.."
|
||||
@ -57,9 +65,10 @@ echo "------------------------------------"
|
||||
|
||||
echo "spdlog-bench-async (single thread)"..
|
||||
time ./spdlog-bench-async
|
||||
rm logs/*
|
||||
echo
|
||||
echo
|
||||
sleep 3
|
||||
sleep 5
|
||||
|
||||
echo "spdlog-bench-mt-async (10 threads, single logger)"..
|
||||
time ./spdlog-bench-mt-async
|
||||
|
Loading…
Reference in New Issue
Block a user