Class StorageOperationMetrics

java.lang.Object
io.temporal.internal.payload.storage.StorageOperationMetrics

public final class StorageOperationMetrics extends Object
Accumulates external storage activity for a single workflow task. Batches may complete concurrently on driver threads, so every method is synchronized.
  • Constructor Details

    • StorageOperationMetrics

      public StorageOperationMetrics()
  • Method Details

    • recordBatch

      public void recordBatch(int count, long sizeBytes, long startNanos, long endNanos, String driverName)
      Records a completed batch. A batch reports the start and end of its span rather than a duration, leaving getTotalDuration() to decide how overlapping spans combine.
    • getPayloadCount

      public int getPayloadCount()
    • getTotalSizeBytes

      public long getTotalSizeBytes()
    • getDriverNames

      public List<String> getDriverNames()
    • getTotalDuration

      public Duration getTotalDuration()
      Wall-clock time storage was in flight. Batches may run concurrently, so overlapping spans are counted once rather than summed.