keith-turner commented on code in PR #4577:
URL: https://github.com/apache/accumulo/pull/4577#discussion_r1609029345
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java:
##########
@@ -601,7 +602,13 @@ private Map<KeyExtent,TabletMetadata>
reserveFilesInner(Collection<KeyExtent> ex
}
if (!filesToReserve.isEmpty()) {
- getContext().getAmple().putScanServerFileReferences(refs);
+ long reservationWriteStart = System.nanoTime();
+ try {
+ getContext().getAmple().putScanServerFileReferences(refs);
Review Comment:
Micrometer Timer meters have a `record(Runnable)` method that could possibly
be used here by passing it a lambda that calls `putScanServerFileReferences()`.
Not sure if that is shorter or better, this is stylistic comment feel free to
ignore it.
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServerMetrics.java:
##########
@@ -43,20 +49,38 @@ public ScanServerMetrics(final
LoadingCache<KeyExtent,TabletMetadata> tabletMeta
@Override
public void registerMetrics(MeterRegistry registry) {
- reservationTimer =
Timer.builder(MetricsProducer.METRICS_SCAN_RESERVATION_TIMER)
+ totalReservationTimer =
Timer.builder(MetricsProducer.METRICS_SCAN_RESERVATION_TOTAL_TIMER)
.description("Time to reserve a tablets files for
scan").register(registry);
+ writeOutReservationTimer =
+ Timer.builder(MetricsProducer.METRICS_SCAN_RESERVATION_WRITEOUT_TIMER)
+ .description("Time to write out a tablets files for
scan").register(registry);
Review Comment:
```suggestion
.description("Time to write out a tablets file reservations for
scan").register(registry);
```
--
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]