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>
37 lines
1.5 KiB
TypeScript
37 lines
1.5 KiB
TypeScript
import { NextResponse } from "next/server";
|
|
import { z } from "zod";
|
|
import { withAuth } from "@/lib/api-auth";
|
|
import { apiError, handleApiError } from "@/lib/api-errors";
|
|
import { BenchmarkError, DESCRIPTION_MAX, deleteBenchmark, getBenchmark, updateBenchmark } from "@/lib/benchmarks";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export const GET = withAuth<RouteContext<"/api/benchmarks/[id]">>(async (_req, { params }) => {
|
|
const run = await getBenchmark((await params).id);
|
|
return run ? NextResponse.json(run) : apiError(404, "not_found", "Benchmark not found.");
|
|
});
|
|
|
|
const Patch = z.object({ label: z.string().max(120).nullable().optional(), description: z.string().max(DESCRIPTION_MAX).nullable().optional() });
|
|
|
|
/** Rename (label) a run or change its description. */
|
|
export const PATCH = withAuth<RouteContext<"/api/benchmarks/[id]">>(async (req, { params }) => {
|
|
try {
|
|
await updateBenchmark((await params).id, Patch.parse(await req.json()));
|
|
return new NextResponse(null, { status: 204 });
|
|
} catch (err) {
|
|
if (err instanceof BenchmarkError) return apiError(err.status, err.code, err.message);
|
|
return handleApiError(err);
|
|
}
|
|
});
|
|
|
|
/** Delete a run with its log and files. */
|
|
export const DELETE = withAuth<RouteContext<"/api/benchmarks/[id]">>(async (_req, { params }) => {
|
|
try {
|
|
await deleteBenchmark((await params).id);
|
|
return new NextResponse(null, { status: 204 });
|
|
} catch (err) {
|
|
if (err instanceof BenchmarkError) return apiError(err.status, err.code, err.message);
|
|
return handleApiError(err);
|
|
}
|
|
});
|