adding system info to benchmark display

This commit is contained in:
Donato Capitella
2026-01-11 10:02:22 +00:00
parent 259bca04de
commit d6c7456bd0
6 changed files with 90 additions and 6 deletions
+12 -1
View File
@@ -281,10 +281,21 @@ for results_dir, is_rpc_source in RESULT_SOURCES:
}
runs.append(run)
# Read system_info.json
sys_info = {}
if RESULT_SOURCES:
si_path = os.path.join(RESULT_SOURCES[0][0], "system_info.json")
if os.path.exists(si_path):
try:
with open(si_path) as f:
sys_info = json.load(f)
except:
pass
# Meta
meta = {
"generated_at": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
"os_kernel": "Fedora 42 — Linux 6.15.9-201.fc42.x86_64 (Sat Aug 2 11:37:34 UTC 2025)",
"system_info": sys_info,
"llamacpp_builds": [{"hash": h, "number": n} for (h, n) in sorted(builds)],
"environments": sorted(envs),
"notes": "pp512 = prompt processing; tg128 = text generation; t/s = tokens/second",
+6
View File
@@ -0,0 +1,6 @@
{
"distro": "Fedora Linux 42 (Workstation Edition)",
"kernel": "6.18.3-100.fc42.x86_64",
"linux_firmware": "linux-firmware-20251111-1.fc42.noarch",
"timestamp": "09 Jan 2026"
}
+35
View File
@@ -5,6 +5,41 @@ MODEL_DIR="$(realpath models)"
RESULTDIR="results"
mkdir -p "$RESULTDIR"
# Capture system info
if [[ ! -f "$RESULTDIR/system_info.json" ]]; then
python3 -c '
import platform, json, datetime
def get_distro():
try:
with open("/etc/os-release") as f:
for line in f:
if line.startswith("PRETTY_NAME="):
return line.split("=", 1)[1].strip().strip("\"")
except:
return "Linux"
return "Linux"
def get_linux_firmware():
try:
import subprocess
result = subprocess.run(["rpm", "-q", "linux-firmware"], capture_output=True, text=True)
if result.returncode == 0:
return result.stdout.strip()
except:
pass
return "unknown"
info = {
"distro": get_distro(),
"kernel": platform.release(),
"linux_firmware": get_linux_firmware(),
"timestamp": datetime.datetime.now().strftime("%d %b %Y")
}
print(json.dumps(info))
' > "$RESULTDIR/system_info.json"
echo "Captured system info to $RESULTDIR/system_info.json"
fi
# Pick exactly one .gguf per model: either
# - any .gguf without "-000*-of-" (single-file models)
# - or the first shard "*-00001-of-*.gguf"