Class OperationTimer
Object
io.delta.kernel.unitycatalog.utils.OperationTimer
Utility class for timing operations and logging their execution duration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceOperationTimer.ThrowingSupplier<T,E extends Exception> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,E extends Exception>
TtimeCheckedOperation(org.slf4j.Logger logger, String operationName, String ucTableId, OperationTimer.ThrowingSupplier<T, E> operation) Times an operation that throws a checked exception of type E and logs the duration.static <T> TtimeUncheckedOperation(org.slf4j.Logger logger, String operationName, String ucTableId, Supplier<T> operation) Times an operation and logs the 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 ETimes 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.
-