@Override
    public void notifyCheckpointComplete(long checkpointId) {
        commitTransaction(checkpointId);
        flushAudit();
        updateLastCheckpointId(checkpointId);
        if (sinkExactlyMetric != null) {
            sinkExactlyMetric.incNumSnapshotComplete();
        }
        // get the start time of the currently completed checkpoint
        Long snapShotStartTimeById = checkpointStartTimeMap.remove(checkpointId);
        if (snapShotStartTimeById != null && sinkExactlyMetric != null) {
            sinkExactlyMetric
                    .recordSnapshotToCheckpointDelay(System.currentTimeMillis() - snapShotStartTimeById);
        }
    }
The map to store the start time of each checkpoint.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/starrocks/src/main/java/org/apache/inlong/sort/starrocks/table/sink/table/StarRocksDynamicSinkFunctionV2.java