mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
[Bugfix]connector指标采集算最大值错误(#836)
This commit is contained in:
@@ -312,8 +312,8 @@ public class ConnectorMetricServiceImpl extends BaseConnectorMetricService imple
|
||||
return Result.buildFailure(NOT_EXIST);
|
||||
}
|
||||
|
||||
Float sum = ret.getData().stream().max((a, b) -> a.getMetric(metric).compareTo(b.getMetric(metric))).get().getMetric(metric);
|
||||
ConnectorMetrics connectorMetrics = ConnectorMetrics.initWithMetric(connectClusterId, connectorName, metric, sum / ret.getData().size());
|
||||
Float max = ret.getData().stream().max((a, b) -> a.getMetric(metric).compareTo(b.getMetric(metric))).get().getMetric(metric);
|
||||
ConnectorMetrics connectorMetrics = ConnectorMetrics.initWithMetric(connectClusterId, connectorName, metric, max);
|
||||
return Result.buildSuc(connectorMetrics);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user