Skip to content

Performance

Eric Flumerfelt edited this page Jun 17, 2022 · 1 revision

Performance

TRACE with spdlog

$ ./spdlog_TRACE_bench
[info] **************************************************************
[info] Multi threaded: 4 threads, 5,000,000 messages
[info] **************************************************************
[info] basic_mt to file               Elapsed: 2.95 secs        1,695,720/sec
[info] basic_devnull_mt               Elapsed: 2.34 secs        2,140,948/sec
[info] 
[info] level-off                      Elapsed: 0.01 secs      622,401,396/sec
[info] 
[info] TRACE lvl off                  Elapsed: 0.01 secs      721,133,078/sec
[info] TRACE to memory                Elapsed: 0.36 secs       14,058,920/sec
[info] TRACE to file                  Elapsed: 3.78 secs        1,322,966/sec
[info] TRACE to /dev/null             Elapsed: 1.14 secs        4,375,946/sec
[info] TRACE to file via spdlog       Elapsed: 3.52 secs        1,420,837/sec
--2020-03-13_21:21:45--

attachment:spdlog_TRACE_bench.cpp

TRACE with messagefacility

THE NUMBERS BELOW ARE microseconds per TRACE or LOG.

$ echo TRACE_INC=$TRACE_INC MESSAGEFACILITY_VERSION=$MESSAGEFACILITY_VERSION;tinfo|egrep 'num_e';treset; tcntl limit_ms  0   0    0; ./mf_test --compare=/dev/null   --cmpmsk=0x1ff -l100000 --just=blah basic
TRACE_INC=~/work/tracePrj/trace/include MESSAGEFACILITY_VERSION=v2_02_01
num_entries       = 100000
using "basic" config (loops=100000)
NOTE: to see DEBUG: either compile -O0 OR TRACE_LVLS=0xf (or -1) or tonSg 3 (or 0-63)
nnn=0x4236ef va_args &[0]=0x7ffd16c61d60
                         M0S0    M1S0    M1S1    M0S1    numbers are time per TRACE in microseconds
     TRACE(2) first     0.002   0.102   4.304   3.994    note: lvl 2 == INFO; level 3 (DEBUG) disabled in mf config?
          TRACEN(2)     0.002   0.097   4.280   4.123    note: lvl 2 == INFO; level 3 (DEBUG) disabled in mf config?
     TRACE(2) again     0.002   0.099   4.337   4.078    note: lvl 2 == INFO; level 3 (DEBUG) disabled in mf config?
    TRACEN w/string     0.002   0.173   4.089   3.886    note: lvl 2 == INFO; level 3 (DEBUG) disabled in mf config?
         TLOG_DEBUG     0.009   0.239   4.302   4.210    note: DEBUG ("S") may be disabled per mf config
            TLOG(7)     0.009   0.243   4.804   4.658    note: DEBUG ("S") may be disabled per mf config
TLOG(7,"va_args")%s     0.009   0.241   4.873   4.701    note: DEBUG ("S") may be disabled per mf config
    TLOG(7,1safe)%s     0.009   1.785   4.746   4.600    note: DEBUG ("S") may be disabled per mf config
     TLOG(7,-1risk)     0.009   0.261   4.796   4.627    note: DEBUG ("S") may be disabled per mf config
          TLOG_INFO     4.231   4.350   4.335   4.215    note: TLOG_INFO "S" may be "forced"
--2020-03-13_12:29:46--

Clone this wiki locally