remove backpressure time from DefaultQueryMetrics pending on-going discussion (#6631)

This commit is contained in:
David Lim 2018-11-15 19:29:50 -07:00 committed by GitHub
parent d738ce4d2a
commit 7b41e23cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -247,7 +247,8 @@ public class DefaultQueryMetrics<QueryType extends Query<?>> implements QueryMet
@Override @Override
public QueryMetrics<QueryType> reportBackPressureTime(long timeNs) public QueryMetrics<QueryType> reportBackPressureTime(long timeNs)
{ {
return reportMillisTimeMetric("query/node/backpressure", timeNs); // Don't emit by default.
return this;
} }
@Override @Override

View File

@ -152,10 +152,5 @@ public class DefaultQueryMetricsTest
actualEvent = cachingEmitter.getLastEmittedEvent().toMap(); actualEvent = cachingEmitter.getLastEmittedEvent().toMap();
Assert.assertEquals("query/node/bytes", actualEvent.get("metric")); Assert.assertEquals("query/node/bytes", actualEvent.get("metric"));
Assert.assertEquals(10L, actualEvent.get("value")); Assert.assertEquals(10L, actualEvent.get("value"));
queryMetrics.reportBackPressureTime(11000001).emit(serviceEmitter);
actualEvent = cachingEmitter.getLastEmittedEvent().toMap();
Assert.assertEquals("query/node/backpressure", actualEvent.get("metric"));
Assert.assertEquals(11L, actualEvent.get("value"));
} }
} }