mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
* Make native installs portable and smaller - Support glibc 2.34 with portable compiler binaries and static LLVM helpers. - Bundle the host runtime and discover optional cross-target packs from project dependencies. - Add application build benchmarks covering latency, executable size, and memory. * Keep bootstrap tools available in Sandbox validation - Isolate Zig for native compiler bootstrap and glibc entropy contracts. - Preserve the existing toolchain scope for cache and corpus tests. * Fix portable compiler bootstrap linking - Keep native support objects compatible with the destination host linker. - Resolve installed targets using the host declared by the toolchain manifest.
13 lines
593 B
TypeScript
13 lines
593 B
TypeScript
export interface Request { route: string; status: number; milliseconds: number; bytes: number }
|
|
export function parse(line: string): Request | null {
|
|
const fields = line.split(" ");
|
|
if (fields.length !== 4) return null;
|
|
const status = Number(fields[1]);
|
|
const milliseconds = Number(fields[2]);
|
|
const bytes = Number(fields[3]);
|
|
if (!Number.isFinite(status) || !Number.isFinite(milliseconds) || !Number.isFinite(bytes)) return null;
|
|
const raw = fields[0]!;
|
|
const query = raw.indexOf("?");
|
|
return { route: query < 0 ? raw : raw.slice(0, query), status, milliseconds, bytes };
|
|
}
|