egor-ryashin commented on a change in pull request #6710: Added an allocation
rate metric #6604
URL: https://github.com/apache/incubator-druid/pull/6710#discussion_r246724774
##########
File path:
core/src/main/java/org/apache/druid/java/util/metrics/JvmMonitor.java
##########
@@ -74,10 +77,19 @@ public boolean doMonitor(ServiceEmitter emitter)
emitJvmMemMetrics(emitter);
emitDirectMemMetrics(emitter);
emitGcMetrics(emitter);
+ emitThreadAllocationMetrics(emitter);
return true;
}
+ private void emitThreadAllocationMetrics(ServiceEmitter emitter)
+ {
+ final ServiceMetricEvent.Builder builder = builder();
+ MonitorUtils.addDimensionsToBuilder(builder, dimensions);
+ Optional<Long> delta = collector.calculateDelta();
+ delta.ifPresent((value) ->
emitter.emit(builder.build("jvm/heapAlloc/bytes", value)));
Review comment:
✅
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]