MCPcopy Create free account
hub / github.com/apache/arrow / test_print_stats

Function test_print_stats

python/pyarrow/tests/test_memory.py:281–294  ·  view source on GitHub ↗
(pool_factory)

Source from the content-addressed store, hash-verified

279
280@pytest.mark.parametrize('pool_factory', supported_factories())
281def test_print_stats(pool_factory):
282 code = f"""if 1:
283 import pyarrow as pa
284
285 pool = pa.{pool_factory.__name__}()
286 buf = pa.allocate_buffer(64, memory_pool=pool)
287 pool.print_stats()
288 """
289 res = subprocess.run([sys.executable, "-c", code], check=True,
290 universal_newlines=True, stdout=subprocess.PIPE,
291 stderr=subprocess.PIPE)
292 if sys.platform == "linux" and not util.running_on_musllinux():
293 # On Linux with glibc at least, all memory pools should emit statistics
294 assert res.stderr.strip() != ""

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected