updated benchmarks

This commit is contained in:
gabime 2014-11-24 23:38:58 +02:00
parent def6fc62f4
commit c948f15822
3 changed files with 53 additions and 44 deletions

View File

@ -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: 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>| |threads|boost log|glog|g2log|spdlog|spdlog<sup>async mode</sup>|
|-------|:-------:|:-----:|------:|------:| |-------|:-------:|:-----:|------:|------:|------:|
|1|4.430s|1.115s|3.227s|0.940s|1.574s |1|4.779s|1.109s|3.155s|0.947s|1.455s
|10|13.985s|2.027s|3.476s|3.822s|1.972 |10|15.151ss|3.546s|3.500s|1.549s|2.040s|

View File

@ -2,32 +2,32 @@ Running benchmakrs (all with 1000,000 writes to the logs folder
boost-bench (single thread).. boost-bench (single thread)..
real 0m4.430s real 0m4.779s
user 0m4.359s user 0m4.256s
sys 0m0.072s sys 0m0.044s
glog-bench (single thread).. glog-bench (single thread)..
real 0m1.115s real 0m1.109s
user 0m0.997s user 0m0.967s
sys 0m0.117s sys 0m0.140s
g2log-bench (single thread).. 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 real 0m3.155s
user 0m4.189s user 0m4.255s
sys 0m1.021s sys 0m0.874s
spdlog-bench (single thread) spdlog-bench (single thread)
real 0m0.940s real 0m0.947s
user 0m0.892s user 0m0.914s
sys 0m0.048s sys 0m0.032s
------------------------------------ ------------------------------------
@ -35,32 +35,32 @@ Multithreaded benchmarks..
------------------------------------ ------------------------------------
boost-bench-mt (10 threads, single logger).. boost-bench-mt (10 threads, single logger)..
real 0m13.985s real 0m15.151s
user 0m35.045s user 0m35.555s
sys 0m7.196s sys 0m7.453s
glog-bench-mt (10 threads, single logger).. glog-bench-mt (10 threads, single logger)..
real 0m2.027s real 0m3.546s
user 0m5.552s user 0m9.836s
sys 0m6.223s sys 0m10.985s
g2log-bench-mt (10 threads, single logger).. 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 real 0m3.500s
user 0m7.649s user 0m7.671s
sys 0m1.619s sys 0m1.646s
spdlog-bench-mt (10 threads, single logger).. spdlog-bench-mt (10 threads, single logger)..
real 0m3.822s real 0m1.549s
user 0m14.233s user 0m6.994s
sys 0m6.117s sys 0m2.969s
------------------------------------ ------------------------------------
@ -68,13 +68,13 @@ Async benchmarks..
------------------------------------ ------------------------------------
spdlog-bench-async (single thread).. spdlog-bench-async (single thread)..
real 0m1.574s real 0m1.455s
user 0m2.613s user 0m2.381s
sys 0m0.405s sys 0m0.417s
spdlog-bench-mt-async (10 threads, single logger).. spdlog-bench-mt-async (10 threads, single logger)..
real 0m1.972s real 0m2.040s
user 0m3.965s user 0m4.076s
sys 0m2.747s sys 0m2.822s

View File

@ -3,53 +3,61 @@ echo "Running benchmakrs (all with 1000,000 writes to the logs folder"
echo echo
echo "boost-bench (single thread).." echo "boost-bench (single thread).."
time ./boost-bench time ./boost-bench
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "glog-bench (single thread).." echo "glog-bench (single thread).."
time ./glog-bench time ./glog-bench
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "g2log-bench (single thread).." echo "g2log-bench (single thread).."
time ./g2log-bench time ./g2log-bench
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "spdlog-bench (single thread)" echo "spdlog-bench (single thread)"
time ./spdlog-bench time ./spdlog-bench
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "------------------------------------" echo "------------------------------------"
echo "Multithreaded benchmarks.." echo "Multithreaded benchmarks.."
echo "------------------------------------" echo "------------------------------------"
echo "boost-bench-mt (10 threads, single logger)".. echo "boost-bench-mt (10 threads, single logger)"..
time ./boost-bench-mt time ./boost-bench-mt
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "glog-bench-mt (10 threads, single logger)".. echo "glog-bench-mt (10 threads, single logger)"..
time ./glog-bench-mt time ./glog-bench-mt
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "g2log-bench-mt (10 threads, single logger)".. echo "g2log-bench-mt (10 threads, single logger)"..
time ./g2log-bench-mt time ./g2log-bench-mt
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "spdlog-bench-mt (10 threads, single logger)".. echo "spdlog-bench-mt (10 threads, single logger)"..
time ./spdlog-bench-mt time ./spdlog-bench-mt
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "------------------------------------" echo "------------------------------------"
echo "Async benchmarks.." echo "Async benchmarks.."
@ -57,9 +65,10 @@ echo "------------------------------------"
echo "spdlog-bench-async (single thread)".. echo "spdlog-bench-async (single thread)"..
time ./spdlog-bench-async time ./spdlog-bench-async
rm logs/*
echo echo
echo echo
sleep 3 sleep 5
echo "spdlog-bench-mt-async (10 threads, single logger)".. echo "spdlog-bench-mt-async (10 threads, single logger)"..
time ./spdlog-bench-mt-async time ./spdlog-bench-mt-async