Add per-server metrics page#6429
Open
DomGarguilo wants to merge 3 commits into
Open
Conversation
Member
Author
dlmarion
reviewed
Jun 16, 2026
|
|
||
| List<Map<String,Object>> data = new ArrayList<>(); | ||
| for (var binary : metricResponse.getMetrics()) { | ||
| var metric = FMetric.getRootAsFMetric(binary); |
Contributor
There was a problem hiding this comment.
There is another method on FMetric which will reduce object allocation. For example:
FMetric fm = new FMetric();
for (final ByteBuffer binary : response.getMetrics()) {
fm = FMetric.getRootAsFMetric(binary, fm);
...
Comment on lines
+1646
to
+1650
| return allMetrics.asMap().entrySet().stream().filter(e -> e.getKey().getType() == type) | ||
| .filter(e -> resourceGroup == null || resourceGroup.isBlank() | ||
| || e.getKey().getResourceGroup().canonical().equals(resourceGroup)) | ||
| .filter(e -> e.getKey().toHostPortString().equals(serverAddress)).map(Entry::getValue) | ||
| .findFirst().orElse(null); |
Contributor
There was a problem hiding this comment.
Can you create a ServerId from the input parameters and get the corresponding value from the allMetrics cache instead of evaluating each entry multiple times?
Member
Author
There was a problem hiding this comment.
Looked into it and I don't think we can as things stand right now. Not all callers pass a RG param and ServerId requires one. I think it would be an improvement to make that required and make things more strict. Looking into that change now.
dlmarion
reviewed
Jun 17, 2026
dlmarion
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes #6400