From 0ecd41bdd464c0f0335a8a4996b1cba6e42bdddd Mon Sep 17 00:00:00 2001 From: Yunchu Lee Date: Mon, 4 Mar 2024 10:17:02 +0900 Subject: [PATCH] add memory usage logging --- tests/unit/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/unit/conftest.py diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py new file mode 100644 index 00000000000..e524f6b03a0 --- /dev/null +++ b/tests/unit/conftest.py @@ -0,0 +1,15 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +import psutil +import pytest + + +@pytest.fixture(autouse=True) +def hello(): + yield + + mem_info = psutil.virtual_memory() + total_g = mem_info.total / 1024**3 + available_g = mem_info.available / 1024**3 + print(f"===== memory usage: {available_g}/{total_g} =====")