zoltar9264 commented on code in PR #20965:
URL: https://github.com/apache/flink/pull/20965#discussion_r1002868608
##########
flink-state-backends/flink-statebackend-common/src/main/java/org/apache/flink/state/common/ChangelogMaterializationMetricGroup.java:
##########
@@ -51,14 +57,17 @@ public ChangelogMaterializationMetricGroup(MetricGroup
parentMetricGroup) {
counter(COMPLETED_MATERIALIZATION, new
ThreadSafeSimpleCounter());
this.failedMaterializationCounter =
counter(FAILED_MATERIALIZATION, new ThreadSafeSimpleCounter());
+
+ gauge(LAST_DURATION_OF_MATERIALIZATION, () -> lastDuration);
}
void reportStartedMaterialization() {
startedMaterializationCounter.inc();
}
- void reportCompletedMaterialization() {
+ void reportCompletedMaterialization(long duration) {
Review Comment:
Hi @fredia , I prefer to pass in duration directly by the caller, so that
ChangelogMaterializationMetricGroup can not depend on the current time.
AbstractCheckpointStats#getEndToEndDuration uses last_ack_time -
trigger_time because the checkpoint may not be completed and the duration may
change.
--
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]