Class OperationTimer

Object
io.delta.kernel.unitycatalog.utils.OperationTimer

public class OperationTimer extends Object
Utility class for timing operations and logging their execution duration.
  • Method Details

    • timeCheckedOperation

      public static <T, E extends Exception> T timeCheckedOperation(org.slf4j.Logger logger, String operationName, String ucTableId, OperationTimer.ThrowingSupplier<T,E> operation) throws E
      Times an operation that throws a checked exception of type E and logs the duration.
      Throws:
      E
    • timeUncheckedOperation

      public static <T> T timeUncheckedOperation(org.slf4j.Logger logger, String operationName, String ucTableId, Supplier<T> operation)
      Times an operation and logs the duration.