Claus Ibsen created CAMEL-25630:
-----------------------------------
Summary: camel-jbang - the route diagram reads its live numbers
from the status file, and the topology only when the routes change
Key: CAMEL-25630
URL: https://issues.apache.org/jira/browse/CAMEL-25630
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.24.0
While a route diagram is open, the camel-jbang monitor asks the integration for
its route topology with metrics ({{route-topology}} with metric, external and
routes) about once a second, also while another tab is on screen.
Measured on an integration with 41 routes and 241 steps:
* each answer is 156 KB, of which 147 KB is the processor tree of each route
with per-step statistics; without metrics it is 48 KB
* the integration also writes its status file every second: 291 KB, of which
181 KB is the routes with the same per-processor statistics (same ids, levels
and the same 14 statistics fields), which the monitor already reads
* each answer arrives about a second late, as it waits for the next poll of the
connector
Proposal: fetch the topology without metrics when the diagram opens, and again
only when the routes change ({{reload}} or {{routesTotal}} in the context
statistics of the status file), and put the live numbers on it from the status
file: the processor statistics by id, the route statistics, the endpoint hits.
The per-second request goes away, and the numbers are as fresh as the status
file.
Putting the topology in the status file instead was considered: every
integration writes that file every second whether or not anyone watches, and
most of the topology is static or already in the file.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)