zjncs opened a new pull request, #5699:
URL: https://github.com/apache/rocketmq-dashboard/pull/5699
### What
`SemanticMetric` — the vocabulary the metric layer matches scraped series by
— had no test. This adds `SemanticMetricTest` with 4 tests pinning its wire
vocabulary.
### Why
The keys are wire identifiers: a renamed key silently breaks a dashboard
chart (the series stops matching), and a duplicated one collapses two charts
into one. The display names and units are what the charts render. None of it
was pinned.
### What is pinned
- all **nine stable wire keys** (`message_in_tps` … `broker_health`);
- all nine chart display names;
- all nine units of measure, including the empty units of the two counters
and the `up` unit of the health gauge;
- the keys are unique and non-blank across the enum.
### Verification
- New tests on unmodified code: **4/4 green** (`mvn test
-Dtest=SemanticMetricTest`).
- Discriminating mutations on `SemanticMetric`, build result verified red
each time:
1. a wire key renamed (`message_in_tps` → `msg_in_tps`) — red;
2. the lag-latency unit changed from `ms` to `s` — red;
3. a second constant given an already-taken key (`consumer_group_number` →
`topic_number`) — red, caught by both the key pin and the uniqueness test.
- Restored: 4/4 green. Test-only change; no product code touched.
--
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]