[ 
https://issues.apache.org/jira/browse/CAMEL-25630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126840#comment-18126840
 ] 

Claus Ibsen commented on CAMEL-25630:
-------------------------------------

Fixed on main in 
https://github.com/apache/camel/commit/1de5ec5135f865070739c872eeb672093e7d5879 
: the Diagram and Routes tabs ask an integration for its route topology without 
numbers ({{metric=false}}), and again only when the status file shows another 
reload count or other route ids. The numbers come from the status file, put 
where the route-topology console puts them. The tabs share one copy 
({{DiagramTopology}} in {{MonitorContext}}), so the Routes and Diagram tabs and 
the message diagrams of the Inspect and Errors tabs ask once between them.

Live test: with the Diagram tab open the integration got no topology request 
after the first one (before: one a second, with numbers; 156 KB an answer for 
an integration of 41 routes and 241 steps, 48 KB without numbers). A reload 
asked once more and showed the new step, and the counts of the HTTP systems a 
route reads from and sends to matched the console's.

_Claude Code on behalf of davsclaus_

> 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
>            Assignee: Claus Ibsen
>            Priority: Major
>             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)

Reply via email to