Release / release (push) Successful in 3m25s
Every run records GPUs (PCIe link under load and maximum, ReBAR, P2P), runtime image/tag/digest and the engine version the server reports, model, quant, KV cache, context and concurrency, plus a whitelisted system summary and a description. Shown on the run page, compare and sweep views; passed to BetterBench as notes and to the launch80 preview as sections. Settings -> Hardware for manual values. Also: scripts/intel-probe.sh (read-only diagnostics for Intel hosts), and --quick is no longer passed together with --passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.8 KiB
TypeScript
71 lines
2.8 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
import { runArgs } from "./betterbench";
|
|
import { stepOf } from "./benchmarks";
|
|
|
|
describe("betterbench runArgs", () => {
|
|
const base = { endpoint: "http://kaname-x-abc123:8080/v1", model: "unsloth/Qwen3-0.6B-GGUF", out: "/data/benchmarks/R/results.json", maxModelLen: 4096 };
|
|
|
|
it("builds a quick run with phases and notes, never checking for updates", () => {
|
|
const args = runArgs({ ...base, settings: { quick: true, passes: null, warmup: null, phases: ["decode", "prefill"] }, notes: { ctx: "4096", label: "q8 kv" } });
|
|
assert.deepEqual(args, [
|
|
"run",
|
|
"--endpoint",
|
|
"http://kaname-x-abc123:8080/v1",
|
|
"--model",
|
|
"unsloth/Qwen3-0.6B-GGUF",
|
|
"--out",
|
|
"/data/benchmarks/R/results.json",
|
|
"--max-model-len",
|
|
"4096",
|
|
"--quick",
|
|
"--decode",
|
|
"--prefill",
|
|
"--note",
|
|
"ctx=4096",
|
|
"--note",
|
|
"label=q8 kv",
|
|
"--no-update-check",
|
|
]);
|
|
});
|
|
|
|
it("drops --quick when passes are given (BetterBench refuses both)", () => {
|
|
const args = runArgs({ ...base, settings: { quick: true, passes: 2, warmup: null, phases: [] }, notes: {} });
|
|
assert.ok(!args.includes("--quick"));
|
|
assert.deepEqual(args.slice(args.indexOf("--passes"), args.indexOf("--passes") + 2), ["--passes", "2"]);
|
|
});
|
|
|
|
it("passes explicit passes and warmup, and no phase flags for a full run", () => {
|
|
const args = runArgs({ ...base, maxModelLen: null, settings: { quick: false, passes: 10, warmup: 2, phases: [] }, notes: {} });
|
|
assert.ok(args.includes("--passes") && args[args.indexOf("--passes") + 1] === "10");
|
|
assert.ok(args.includes("--warmup") && args[args.indexOf("--warmup") + 1] === "2");
|
|
assert.ok(!args.includes("--quick") && !args.includes("--decode") && !args.includes("--max-model-len"));
|
|
});
|
|
|
|
it("turns progress lines into steps", () => {
|
|
assert.equal(stepOf("[single] chat: warmup 1 + 5 runs"), "Generation: chat");
|
|
assert.equal(stepOf("[prefill] depth ~2000 tok: warmup 2 + 8"), "Prompt processing: depth ~2000 tok");
|
|
assert.equal(stepOf("model max context: 4096 tokens"), null);
|
|
});
|
|
});
|
|
|
|
describe("parseNvidiaSmi", () => {
|
|
it("reads nvidia-smi CSV", async () => {
|
|
const { parseNvidiaSmi } = await import("./runtimes");
|
|
assert.deepEqual(parseNvidiaSmi("0, GPU-02d5eae7-e371-6b8f-adaf-2b18648bdb84, NVIDIA GeForce RTX 3080, 10240, 617.14, 00000000:2B:00.0, 1, 4, 16, 16\n"), [
|
|
{
|
|
vendor: "nvidia",
|
|
index: 0,
|
|
uuid: "GPU-02d5eae7-e371-6b8f-adaf-2b18648bdb84",
|
|
name: "NVIDIA GeForce RTX 3080",
|
|
memoryMb: 10240,
|
|
driver: "617.14",
|
|
pciAddress: "0000:2b:00.0",
|
|
linkCurrent: { gen: 1, width: 16 },
|
|
linkMax: { gen: 4, width: 16 },
|
|
},
|
|
]);
|
|
assert.deepEqual(parseNvidiaSmi("NVIDIA-SMI has failed"), []);
|
|
});
|
|
});
|