MCPcopy Create free account
hub / github.com/PyTables/PyTables / limit_es

Function limit_es

tables/leaf.py:86–92  ·  view source on GitHub ↗

Protection against creating too small or too large chunks.

(expected_mb: int)

Source from the content-addressed store, hash-verified

84
85
86def limit_es(expected_mb: int) -> int:
87 """Protection against creating too small or too large chunks."""
88 if expected_mb < 1: # < 1 MB
89 expected_mb = 1
90 elif expected_mb > 10**7: # > 10 TB
91 expected_mb = 10**7
92 return expected_mb
93
94
95def calc_chunksize(expected_mb: int) -> int:

Callers 1

calc_chunksizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected