zmuxuny opened a new issue, #6625: URL: https://github.com/apache/rocketmq-dashboard/issues/6625
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version rocketmq-studio @ 779b8c0e7aed2396d3cc72743dcd544ea48e9ae6 ### Runtime Environment Linux x86_64; deterministic backend unit reproduction, no live deployment needed. ### Connected RocketMQ Cluster Apache RocketMQ provider, two mocked master broker runtime responses. Broker TPS values are fractional strings as accepted by the existing parser. ### Build Toolchain JDK 21; Maven 3.9.11; project Maven test/checkstyle configuration. ### Describe the Bug RocketMQDashboardProvider truncates each broker TPS to long before adding it. This loses all fractional contributions, understating instance and cluster traffic. Two brokers each reporting 0.75 TPS become 0 TPS rather than floor(1.50) = 1; 10.75 + 20.75 becomes 30 rather than 31. This affects inbound/outbound totals and the derived messages-per-second summary. ### Steps to Reproduce 1. Return runtime stats for two masters with put/get TPS values 0.75 each (also test 10.75 and 20.75). 2. Invoke the real RocketMQDashboardProvider instance statistics and cluster statistics paths. 3. Assert the long-valued public result equals truncation of the summed valid broker rates, rather than a sum of individually truncated rates. Regression run against unchanged production code: 32 tests, exactly 2 failures, 30 passing controls, no errors; checkstyle passes. ### What Did You Expect to See? Preserve fractional broker rates during aggregation, then convert once at the existing long-valued public output boundary. Keep the API type and established single-broker conversion behavior. ### What Did You See Instead? Both multi-broker regression cases fail: valid sub-one TPS samples disappear and mixed fractional rates are systematically understated. ### Additional Context The loss occurs in parseTps and its broker accumulation callers in RocketMQDashboardProvider. This report is scoped to multi-broker aggregation within one instance/cluster; it does not request changing the public DTO type or reconstructing fractional rates from already-integer cross-instance DTOs. Searched open/closed TPS fractional/truncation reports and existing author PRs; no matching fix found. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
