pi-mono/packages/agent/vitest.benchmark.config.ts
Christian Klotz 8718fbea77
feat(agent): add session storage benchmarks
Add reusable timing, loaded-footprint, and allocation workloads and runners. Index memory entries by sequence so limited scans can stop early.
2026-08-13 10:40:43 +03:00

23 lines
771 B
TypeScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const telemetrySrcIndex = fileURLToPath(new URL("../telemetry/src/index.ts", import.meta.url));
const aiSrcIndex = fileURLToPath(new URL("../ai/src/index.ts", import.meta.url));
const aiSrcCompat = fileURLToPath(new URL("../ai/src/compat.ts", import.meta.url));
export default defineConfig({
test: {
environment: "node",
benchmark: {
include: ["benchmark/session/**/*.bench.ts"],
reporters: ["verbose"],
},
},
resolve: {
alias: [
{ find: /^@earendil-works\/pi-telemetry$/, replacement: telemetrySrcIndex },
{ find: /^@earendil-works\/pi-ai$/, replacement: aiSrcIndex },
{ find: /^@earendil-works\/pi-ai\/compat$/, replacement: aiSrcCompat },
],
},
});