Closed jasraj closed 3 years ago
Comparing the new pattern-based logging (increased flexibility) vs the old logger (fixed):
/ model name : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz / Setup q) dict:`a`b`c!1 2 3; / For new pattern-based logging (matching original logger) q) .log.cfg.format:"%d %t %l %p %u %h %m" q) .log.setLogger[] q) .log.info "A dictionary: ",.Q.s1 dict; / Original q) .log.info ("A dictionary: {}"; dict); / Parameterised
Results:
ts
20 4195376
22 4195376
21 4195264
24 4195264
The pattern-based logging has ~10% degradation in performance when logging with the same elements as the original logging.
/ model name : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz / Setup q) .test.log:{ .log.info "Logging test" }; / Original logger pattern q) .log.cfg.format:"%d %t %l %p %u %h %m" q) .log.setLogger[] / Logger pattern with call trace logging q) .log.cfg.format:"%d %t %l %p %u %h %T %m" q) .log.setLogger[] q) \ts do[1000; .test.log[]; ]
12 4195088
28 4195088
Including call-trace logging in the formatting has ~130% degradation in performance
Performance Testing
Equivalent Logging
Comparing the new pattern-based logging (increased flexibility) vs the old logger (fixed):
Results:
ts
20 4195376
22 4195376
21 4195264
24 4195264
The pattern-based logging has ~10% degradation in performance when logging with the same elements as the original logging.
Call Trace Logging
Results:
ts
12 4195088
28 4195088
Including call-trace logging in the formatting has ~130% degradation in performance