fetch_rpc_counter_window

Documentation for eth_defi.provider.rpc_counter_comparison.fetch_rpc_counter_window function.

fetch_rpc_counter_window(path, start, end)

Aggregate an explicit half-open window from an immutable snapshot.

Item counts are deduplicated by chain, phase, date and cycle because each method/provider row repeats them. Old counters have no completion outcomes; their completed-cycle denominator is deliberately unavailable. Outcome counts deduplicate each status within a cycle; a retried cycle may appear under both failed and completed. They are not individual attempt counts. Windows filter stored UTC cycle-start dates, not individual request times; snapshot after the included cycles finish.

Parameters
Returns

Totals, daily rates and diagnostics. groups contains (chain_id, phase, api_call, rpc_provider_domain, call_count); phase_items_and_cycles contains (chain_id, phase, items_scanned, cycle_count); operations contains (chain_id, phase, operation, api_call, rpc_provider_domain, call_count); and outcomes contains (chain_id, phase, outcome, cycle_count). Chain IDs and counts are integers; labels, methods and domains are strings.

Return type

dict