[nop] Update benchmark results

This commit is contained in:
Peter Taoussanis 2024-08-15 13:09:34 +02:00
parent 5ab2736c92
commit badbb2c768
2 changed files with 41 additions and 28 deletions

View file

@ -209,22 +209,32 @@ See [here](../../wiki/8-Community) for community resources.
## Benchmarks ## Benchmarks
Telemere is **highly optimized** and offers terrific performance at any scale: Telemere is **highly optimized** and offers great performance at any scale:
| Compile-time filtering? | Runtime filtering? | Time? | Trace? | nsecs | | Compile-time filtering? | Runtime filtering? | Profile? | Trace? | nsecs |
| :---------------------: | :----------------: | :---: | :----: | ----: | | :---------------------: | :----------------: | :------: | :----: | ----: |
| ✓ (elide) | - | - | - | 0 | | ✓ (elide) | - | - | - | 0 |
| - | ✓ | - | - | 200 | | - | ✓ | - | - | 350 |
| - | ✓ | ✓ | - | 280 | | - | ✓ | ✓ | - | 450 |
| - | ✓ | ✓ | ✓ | 650 | | - | ✓ | ✓ | ✓ | 1000 |
Measurements: Measurements:
- Are **~nanoseconds per signal call** (= milliseconds per 1e6 calls) - Are **~nanoseconds per signal call** (= milliseconds per 1e6 calls)
- Exclude [handler runtime](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#get-handlers-stats) (which depends on handler/s, is usually async) - Exclude [handler runtime](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#get-handlers-stats) (which depends on handler/s, is usually async)
- Taken on a 2020 Macbook Pro M1, running OpenJDK 21 - Taken on a 2020 Macbook Pro M1, running Clojure v1.12 and OpenJDK v22
**Tip**: Telemere offers extensive [filtering](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#help:filters) support - including dead-easy per-signal and per-handler **sampling** and **rate-limiting**. Use these to ensure that you're not capturing useless/low-value information in production. See [here](../../wiki/7-Tips) for more tips! ### Performance philosophy
Telemere is optimized for *real-world* performance. This means **prioritizing flexibility** and realistic usage over synthetic micro benchmarks.
Large applications can produce absolute *heaps* of data, not all equally valuable. Quickly processing infinite streams of unmanageable junk is an anti-pattern. As scale and complexity increase, it becomes more important to **strategically plan** what data to collect, when, in what quantities, and how to manage it.
Telemere is designed to help with all that. It offers [rich data](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#help:signal-content) and unmatched [filtering](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#help:filters) support - including per-signal and per-handler **sampling** and **rate-limiting**.
Use these to ensure that you're not capturing useless/low-value/high-noise information in production! With appropriate planning, Telemere is designed to scale to systems of any size and complexity.
See [here](../../wiki/7-Tips) for detailed tips on real-world usage.
## Funding ## Funding

View file

@ -318,33 +318,36 @@
;;;; Flow benchmarks ;;;; Flow benchmarks
(comment (comment
{:last-updated "2024-02-12" {:last-updated "2024-08-15"
:system "2020 Macbook Pro M1, 16 GB memory" :system "2020 Macbook Pro M1, 16 GB memory"
:clojure-version "1.11.1" :clojure-version "1.12.0-rc1"
:java-version "OpenJDK 21"} :java-version "OpenJDK 22"}
[(binding [impl/*sig-handlers* nil] [(binding [impl/*sig-handlers* nil]
(enc/qb 1e6 ; [10.4 17.06 195.42 200.34] (enc/qb 1e6 ; [9.31 16.76 264.12 350.43]
(signal! {:level :info, :run nil, :elide? true}) (signal! {:level :info, :run nil, :elide? true }) ; 9
(signal! {:level :info, :run nil, :allow? false}) (signal! {:level :info, :run nil, :allow? false}) ; 17
(signal! {:level :info, :run nil, :allow? true }) (signal! {:level :info, :run nil, :allow? true }) ; 264
(signal! {:level :info, :run nil}))) (signal! {:level :info, :run nil }) ; 350
))
(binding [impl/*sig-handlers* nil] (binding [impl/*sig-handlers* nil]
(enc/qb 1e6 ; [8.1 15.35 647.82 279.67 682.1] (enc/qb 1e6 ; [8.34 15.78 999.27 444.08 1078.83]
(signal! {:level :info, :run "run", :elide? true}) (signal! {:level :info, :run "run", :elide? true }) ; 8
(signal! {:level :info, :run "run", :allow? false}) (signal! {:level :info, :run "run", :allow? false}) ; 16
(signal! {:level :info, :run "run", :allow? true }) (signal! {:level :info, :run "run", :allow? true }) ; 1000
(signal! {:level :info, :run "run", :trace? false}) (signal! {:level :info, :run "run", :trace? false}) ; 444
(signal! {:level :info, :run "run"}))) (signal! {:level :info, :run "run" }) ; 1079
))
;; For README "performance" table ;; For README "performance" table
(binding [impl/*sig-handlers* nil] (binding [impl/*sig-handlers* nil]
(enc/qb [8 1e6] ; [9.23 197.2 277.55 649.32] (enc/qb [8 1e6] ; [9.34 347.7 447.71 1086.65]
(signal! {:level :info, :elide? true}) (signal! {:level :info, :elide? true }) ; 9
(signal! {:level :info}) (signal! {:level :info }) ; 348
(signal! {:level :info, :run "run", :trace? false}) (signal! {:level :info, :run "run", :trace? false}) ; 448
(signal! {:level :info, :run "run"})))]) (signal! {:level :info, :run "run" }) ; 1087
))])
;;;; ;;;;