protected void updateMetricsOnFinish(Env env, long runtime, boolean success) {
    if (env instanceof ConfigNodeProcedureEnv) {
      ((ConfigNodeProcedureEnv) env)
          .getConfigManager()
          .getProcedureManager()
          .getProcedureMetrics()
          .updateMetricsOnFinish(getProcType(), runtime, success);
    }
  }
This function will be called just after procedure execution is finished. Override this method
to update metrics at the end of the procedure. The default implementation adds runtime of a
procedure to a time histogram for successfully completed procedures. Increments failed counter
for failed procedures.

@param env The environment passed to the procedure executor
@param runtime Runtime of the procedure in milliseconds
@param success true if procedure is completed successfully
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java