diff --git a/pyproject.toml b/pyproject.toml index 7259fd7..4681343 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ ] dependencies = [ + "psutil", "requests", "schedule", "tomlkit" diff --git a/src/endstone_bstats/_metrics.py b/src/endstone_bstats/_metrics.py index 82c86af..4bffb64 100644 --- a/src/endstone_bstats/_metrics.py +++ b/src/endstone_bstats/_metrics.py @@ -1,8 +1,8 @@ -import os import platform from pathlib import Path from typing import Any, Callable, Dict +import psutil from endstone.plugin import Plugin from endstone_bstats._base import MetricsBase @@ -71,7 +71,7 @@ def append_platform_data(self, platform_data: Dict[str, Any]) -> None: platform_data["osVersion"] = platform.release() platform_data["osArch"] = platform.machine().lower() - platform_data["coreCount"] = os.cpu_count() + platform_data["coreCount"] = psutil.cpu_count(logical=False) def append_service_data(self, service_data: Dict[str, Any]): """