tensorstore.TensorStore.storage_statistics(self, *, query_not_stored: bool = False, query_fully_stored: bool = False) Future[TensorStore.StorageStatistics]

Obtains statistics of the data stored for the domain.

Only the specific information indicated by the parameters will be returned. If no query options are specified, no information will be computed.

Example

>>> store = await ts.open({
...     "driver": "zarr",
...     "kvstore": "memory://"
... },
...                       shape=(100, 200),
...                       dtype=ts.uint32,
...                       create=True)
>>> await store.storage_statistics(query_not_stored=True)
TensorStore.StorageStatistics(not_stored=True, fully_stored=None)
>>> await store[10:20, 30:40].write(5)
>>> await store.storage_statistics(query_not_stored=True)
TensorStore.StorageStatistics(not_stored=False, fully_stored=None)
>>> await store.storage_statistics(query_not_stored=True,
...                                query_fully_stored=True)
TensorStore.StorageStatistics(not_stored=False, fully_stored=True)
>>> await store[10:20, 30:40].storage_statistics(query_fully_stored=True)
TensorStore.StorageStatistics(not_stored=None, fully_stored=True)
Parameters:
query_not_stored: bool = False

Check whether there is data stored for any element of the domain.

query_fully_stored: bool = False

Check whether there is data stored for all elements of the domain.

Warning

Enabling this option may significantly increase the cost of the storage_statistics query.

Returns:

The requested statistics.

Raises:

NotImplementedError – If the driver does not support this operation.