Query Statistics API¶
This page documents the arcticdb.toolbox.query_stats
module. This module provides utilities for collecting query statistics in ArcticDB.
Warning: This API is unstable and not governed by ArcticDB's semantic versioning. It may change or be removed in future versions without notice.
arcticdb.toolbox.query_stats ¶
Query Statistics API for ArcticDB.
This module provides utilities for collecting query statistics.
Notes
Warning
This API is unstable and not governed by ArcticDB's semantic versioning. It may change or be removed in future versions without notice.
FUNCTION | DESCRIPTION |
---|---|
disable |
Disable query statistics collection. |
enable |
Enable query statistics collection. |
get_query_stats |
Get collected query statistics. |
query_stats |
Context manager for enabling query statistics collection within a specific scope. |
reset_stats |
Reset all collected query statistics. |
disable ¶
disable() -> None
Disable query statistics collection.
Stops collecting statistics for subsequent operations. Previously collected statistics remain available via get_query_stats().
Notes
Warning
This API is unstable and not governed by semantic versioning.
enable ¶
enable() -> None
Enable query statistics collection.
Once enabled, statistics will be collected for operations performed until disable() is called or the context manager exits.
Notes
Warning
This API is unstable and not governed by semantic versioning.
get_query_stats ¶
get_query_stats() -> Dict[str, Any]
Get collected query statistics.
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]:
|
A dictionary containing statistics organized by key type, operation group, and task type. Each task contains timing and count information. Example output: { "storage_operations": { "S3_ListObjectsV2": { "total_time_ms": 83, "count": 3 }, "S3_GetObject": { "total_time_ms": 50, "count": 3, "size_bytes": 10 } } } |
Notes
Warning
This API is unstable and not governed by semantic versioning.
query_stats ¶
query_stats() -> Iterator[None]
Context manager for enabling query statistics collection within a specific scope.
When entering the context, query statistics collection is enabled. When exiting the context, it is automatically disabled.
RAISES | DESCRIPTION |
---|---|
UserInputException
|
If query stats is already enabled. |
Examples:
>>> with query_stats():
... store.list_symbols()
Notes
Warning
This API is unstable and not governed by semantic versioning.
reset_stats ¶
reset_stats() -> None
Reset all collected query statistics.
This clears all statistics that have been collected since enabling the query statistics collection.
Notes
Warning
This API is unstable and not governed by semantic versioning.