You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/07/09 13:19:00 UTC
[jira] [Created] (CAMEL-23976) Add percentile latency statistics (p50/p95/p99) to Extended management statistics
Claus Ibsen created CAMEL-23976:
-----------------------------------
Summary: Add percentile latency statistics (p50/p95/p99) to Extended management statistics
Key: CAMEL-23976
URL: https://issues.apache.org/jira/browse/CAMEL-23976
Project: Camel
Issue Type: Improvement
Components: camel-management
Reporter: Claus Ibsen
Currently Camel's ManagedPerformanceCounter only tracks min, max, and mean processing time. For monitoring and troubleshooting, percentile latencies (p50, p95, p99) are much more useful than mean — they reveal tail latency that averages hide.
*Proposal:* when ManagementStatisticsLevel is set to Extended, allocate a sliding-window ring buffer (long[1024]) in ManagedPerformanceCounter to record recent processing times. On each completedExchange(), write the processing time into the buffer (single array write — negligible overhead). Expose new MBean methods for p50, p95, p99 that sort the buffer on demand when queried.
*Key design points:*
- Only enabled when statisticsLevel=Extended — zero overhead for Default/RoutesOnly/Off
- Sliding window of last 1024 exchanges gives exact percentiles over recent activity (no approximation)
- ~8KB memory per route/processor (1024 longs) — negligible
- No external dependency needed (no HDRHistogram library)
- Methods return -1 when Extended is not enabled
- The sliding window approach fits live monitoring use cases (TUI, dev console) where "what's happening now" matters more than lifetime cumulative percentiles
*Changes needed:*
- ManagedPerformanceCounterMBean: add getProcessingTimeP50/P95/P99 methods
- ManagedPerformanceCounter: add ring buffer, write in completedExchange(), implement percentile computation
- Dev console / TUI can then display these values
--
This message was sent by Atlassian Jira
(v8.20.10#820010)