davsclaus opened a new pull request, #29486:
URL: https://github.com/apache/camel/pull/29486
_Claude Code on behalf of davsclaus_
Fixes from walking every screen with the `fail-well/circuit-breaker` example
running.
- **Source: "○ not running yet … restart it" on every example launched from
the TUI.** The run state compared the save time of the file with the start of
the JVM (`ProcessHandle.startInstant`). An example run from the TUI writes its
files from the integration itself, after its JVM started (JVM 13:35:36, files
13:35:37.188), so its source never ran "as saved". It now compares with the
start of the CamelContext (`startTimestamp` of the status), which comes after
the routes are loaded, and falls back to the JVM start for an integration that
does not report it.
- **Log: the first line was cut** (`5:13:22.234 INFO 292054 --- [...`, not
compacted). Opening a log read its last 8 KB from inside a line. The partial
line is now skipped, by byte offset, so "load older lines" brings it back
whole. The tab also reads 32 KB instead of 8 KB on opening, which fills a tall
screen (8 KB was about 36 lines).
- **Circuit Breaker: the ok/fail msg/s chart stayed at 0.** It was fed from
`successfulCalls`/`failedCalls`, which are the breaker's sliding window and
stop growing once it is full. It was also counted in whole calls a second, so a
breaker called once a second read 0 when two samples were a little over a
second apart.
- It now charts the calls the protected steps answered (`total −
fallbackCalls`) and those the fallback answered (failed, timed out or
rejected), from running totals, scaled by `THROUGHPUT_SCALE` like the endpoint
rates. The bottom series is labelled `fallback`.
- A breaker that shows up after the tab was opened, while the route is
still starting, is now selected, so its detail shows.
- The help said SUCCESS and FAIL were totals; they are the sliding window.
- **Events:** events of the same millisecond, such as the created, sending,
sent and completed events of a quick exchange, showed oldest first under the
newest-first sort. The list arrives oldest first and the sort is stable, so it
is now turned around before sorting.
- **Errors: COUNT showed the count up to each kept entry** (1, 2, 3, then 8,
9, 10). It is now shown only on the newest entry of each kind (route and
exception type), so the column adds up to the errors that happened. When more
errors happened than are kept, the title says so: `Errors [6] 13 happened, the
newest of each kind are kept`. Help updated.
Not in this PR: the steps of a circuit breaker's `onFallback` have no
processor MBean, so they are missing from Routes ▸ Processors. That is in
camel-management and filed as CAMEL-26785.
Tests: new `LogTabTailTest`, `EventTabOrderTest`,
`MetricsCollectorCircuitBreakerTest`, and cases in `SourceRunStateTest`,
`ErrorsTabRenderTest` and `CircuitBreakerTabRenderTest`. The full
`camel-jbang-plugin-tui` suite passes (2423). Checked live with the
circuit-breaker example launched from the TUI: the Source says "● running as
saved", and the chart shows the outage as fallback calls, then the ok calls
coming back.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]