mreutegg commented on code in PR #690:
URL: https://github.com/apache/jackrabbit-oak/pull/690#discussion_r970706423
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreStats.java:
##########
@@ -157,6 +203,41 @@ public DocumentStoreStats(StatisticsProvider provider) {
prefetchNodes = provider.getMeter(NODES_PREFETCH,
StatsOptions.DEFAULT);
prefetchNodesTimer = provider.getTimer(NODES_PREFETCH_TIMER,
StatsOptions.METRICS_ONLY);
+
+ // metrics for throttling
+ MeterStats createSplitNodeWithThrottlingMeter =
provider.getMeter(NODES_CREATE_SPLIT_WITH_THROTTLING, StatsOptions.DEFAULT);
Review Comment:
I'm not sure, but I would rather keep the operation and throttling time
separate. That is, no matter if throttling is on or off, we always have a
metric for the operation with the underlying DocumentStore implementation. When
throttling is on and in effect, then we'd see it in a newly introduced metric.
For this case here, I would name it `NODES_CREATE_SPLIT_THROTTLING`. This
metric would only reflect/cover the throttling part of the operation.
Another advantage of this design is backward compatibility. With the
proposed change the current metric would not get any updates as soon as
throttling kicks in. It will look as if there were no operations at all while
throttling was in effect.
--
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]