Report how many tiles were requested from an image's backend, how many payload bytes were read from its file by windowed readers, and how many bytes were returned as decoded arrays. Cache hits are not counted as reads.
Usage
at_read_stats(img, reset = FALSE, call = rlang::caller_env())Arguments
- img
An annot_image.
- reset
Logical; reset the counters for this image after reporting.
- call
The calling environment, for error reporting.
Value
A list with tiles (integer), file_bytes, decoded_bytes and
max_tile_bytes (doubles), plus window_read (logical) and the current
max_tile_bytes_limit from option annotatR.max_tile_bytes.
Examples
cube <- at_example_image("cube")
invisible(at_tile(cube, xrange = c(1, 4), yrange = c(1, 4), bands = 1:2))
at_read_stats(cube)$tiles
#> [1] 3