Statistics
Classes for collecting TileDB performance metrics. Use these to profile read/write operations, cache efficiency, and S3 access patterns.
radiobject.TileDBStats
Context manager for collecting TileDB statistics.
Wraps TileDB's internal stats collection to provide structured access to cache and VFS metrics.
Example
with TileDBStats() as stats: vol = Volume(uri) data = vol.to_numpy()
cache = stats.cache_stats() print(f"Cache hit rate: {cache.hit_rate:.1%}")
__enter__()
Enable TileDB statistics collection.
__exit__(exc_type, exc_val, exc_tb)
Capture stats and disable collection.
__init__()
Initialize stats collector.
all_counters()
Return all TileDB counters as a dictionary.
Useful for debugging and discovering available counter names.
cache_stats()
Parse cache statistics from TileDB stats dump.
counters()
Return TileDB counters with user-friendly names (no internal prefixes).
raw_json()
Return raw TileDB stats JSON string.
s3_stats()
Parse S3/VFS statistics.
Note
Local filesystem operations will show zeros for S3-specific counters.
radiobject.CacheStats
dataclass
TileDB cache statistics.
hit_rate
property
Compute cache hit rate (0.0 to 1.0).
miss_rate
property
Compute cache miss rate (0.0 to 1.0).
radiobject.S3Stats
dataclass
S3/VFS statistics.
parallelization_rate
property
Fraction of reads that were parallelized (0.0 to 1.0).