Skip to content

Commit

Permalink
Add memory usage logging to unittests (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunchu authored Mar 4, 2024
1 parent 5b98827 commit a33b510
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
@@ -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} =====")

0 comments on commit a33b510

Please sign in to comment.