wankai123 commented on code in PR #13608:
URL: https://github.com/apache/skywalking/pull/13608#discussion_r2617082905
##########
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/Analyzer.java:
##########
@@ -129,6 +129,13 @@ public void analyse(final ImmutableMap<String,
SampleFamily> sampleFamilies) {
}
if (filterExpression != null) {
input = filterExpression.filter(input);
+ boolean empty = input.values().stream().allMatch(s -> s ==
SampleFamily.EMPTY);
Review Comment:
Wouldn't it be better to directly filter out the unmatched metrics here and
not return EMPTY?
Notice: this function leverage the `filter` in SampleFamily but not the same
one.
https://github.com/apache/skywalking/blob/ed5e729026da621557b83b5dfa78e57ee0bc524a/oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/FilterExpression.java#L43
--
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]