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

Function test_print_stats

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected