From badbb2c768ac55fcef05e0826368814b2e7d4404 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Thu, 15 Aug 2024 13:09:34 +0200 Subject: [PATCH] [nop] Update benchmark results --- README.md | 28 +++++++++++++++++--------- src/taoensso/telemere.cljc | 41 ++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 097c9ba..c610ad0 100644 --- a/README.md +++ b/README.md @@ -209,22 +209,32 @@ See [here](../../wiki/8-Community) for community resources. ## 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 | -| :---------------------: | :----------------: | :---: | :----: | ----: | -| ✓ (elide) | - | - | - | 0 | -| - | ✓ | - | - | 200 | -| - | ✓ | ✓ | - | 280 | -| - | ✓ | ✓ | ✓ | 650 | +| Compile-time filtering? | Runtime filtering? | Profile? | Trace? | nsecs | +| :---------------------: | :----------------: | :------: | :----: | ----: | +| ✓ (elide) | - | - | - | 0 | +| - | ✓ | - | - | 350 | +| - | ✓ | ✓ | - | 450 | +| - | ✓ | ✓ | ✓ | 1000 | Measurements: - 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) -- 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 diff --git a/src/taoensso/telemere.cljc b/src/taoensso/telemere.cljc index c49351b..a7d2371 100644 --- a/src/taoensso/telemere.cljc +++ b/src/taoensso/telemere.cljc @@ -318,33 +318,36 @@ ;;;; Flow benchmarks (comment - {:last-updated "2024-02-12" + {:last-updated "2024-08-15" :system "2020 Macbook Pro M1, 16 GB memory" - :clojure-version "1.11.1" - :java-version "OpenJDK 21"} + :clojure-version "1.12.0-rc1" + :java-version "OpenJDK 22"} [(binding [impl/*sig-handlers* nil] - (enc/qb 1e6 ; [10.4 17.06 195.42 200.34] - (signal! {:level :info, :run nil, :elide? true}) - (signal! {:level :info, :run nil, :allow? false}) - (signal! {:level :info, :run nil, :allow? true }) - (signal! {:level :info, :run nil}))) + (enc/qb 1e6 ; [9.31 16.76 264.12 350.43] + (signal! {:level :info, :run nil, :elide? true }) ; 9 + (signal! {:level :info, :run nil, :allow? false}) ; 17 + (signal! {:level :info, :run nil, :allow? true }) ; 264 + (signal! {:level :info, :run nil }) ; 350 + )) (binding [impl/*sig-handlers* nil] - (enc/qb 1e6 ; [8.1 15.35 647.82 279.67 682.1] - (signal! {:level :info, :run "run", :elide? true}) - (signal! {:level :info, :run "run", :allow? false}) - (signal! {:level :info, :run "run", :allow? true }) - (signal! {:level :info, :run "run", :trace? false}) - (signal! {:level :info, :run "run"}))) + (enc/qb 1e6 ; [8.34 15.78 999.27 444.08 1078.83] + (signal! {:level :info, :run "run", :elide? true }) ; 8 + (signal! {:level :info, :run "run", :allow? false}) ; 16 + (signal! {:level :info, :run "run", :allow? true }) ; 1000 + (signal! {:level :info, :run "run", :trace? false}) ; 444 + (signal! {:level :info, :run "run" }) ; 1079 + )) ;; For README "performance" table (binding [impl/*sig-handlers* nil] - (enc/qb [8 1e6] ; [9.23 197.2 277.55 649.32] - (signal! {:level :info, :elide? true}) - (signal! {:level :info}) - (signal! {:level :info, :run "run", :trace? false}) - (signal! {:level :info, :run "run"})))]) + (enc/qb [8 1e6] ; [9.34 347.7 447.71 1086.65] + (signal! {:level :info, :elide? true }) ; 9 + (signal! {:level :info }) ; 348 + (signal! {:level :info, :run "run", :trace? false}) ; 448 + (signal! {:level :info, :run "run" }) ; 1087 + ))]) ;;;;