Add enable collect judgment (#12666)

* add Enable Collect Judgment

* add Enable Collect Judgment
This commit is contained in:
PiteXChen 2023-07-19 15:00:26 +08:00 committed by GitHub
parent c54e1b63f9
commit 12f2222326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ public class AggregateMetricsCollector implements MetricsCollector<RequestEvent>
@Override
public List<MetricSample> collect() {
List<MetricSample> list = new ArrayList<>();
if (!isCollectEnabled()){
return list;
}
collectRequests(list);
collectQPS(list);
collectRT(list);