Learn R Programming

RKorAPClient (version 1.1.0)

calculate_sophisticated_eta: Calculate sophisticated ETA using median of recent non-cached times

Description

Advanced ETA calculation that excludes cached responses and uses median of recent timing data for more stable estimates. This is particularly useful for operations where some responses may be cached and much faster.

Usage

calculate_sophisticated_eta(
  individual_times,
  current_item,
  total_items,
  cache_threshold = 0.1,
  window_size = 5
)

Value

list with eta_seconds, estimated_completion_time, and is_cached flag

Arguments

individual_times

numeric vector of individual item processing times

current_item

current item number (1-based)

total_items

total number of items to process

cache_threshold

minimum time in seconds to consider as non-cached (default: 0.1)

window_size

number of recent non-cached times to use for median calculation (default: 5)