← Files Biological Sequence & Alignment ViewerARCHIVED FILE
src/msa/performance.test.ts
875 Bytes · Sep 30, 2026 · 23:01 UTC
import { describe, expect, it } from "vitest";
import { runMsaPerformanceBenchmark } from "./performance";
describe("runMsaPerformanceBenchmark", () => {
it("reports parse, analysis, search, and bounded virtual mount metrics", async () => {
const report = await runMsaPerformanceBenchmark({
contents: [">a", "AAGT", ">b", "ACGT", ">c", "A-GT"].join("\n"),
filePath: "/tmp/bench.afa",
motifQuery: "ACT",
});
expect(report.rowCount).toBe(3);
expect(report.alignedLength).toBe(4);
expect(report.parseMs).toBeGreaterThanOrEqual(0);
expect(report.analysisMs).toBeGreaterThanOrEqual(0);
expect(report.searchMs).toBeGreaterThanOrEqual(0);
expect(report.motifHitCount).toBeGreaterThan(0);
expect(report.mountedRowCount).toBeLessThanOrEqual(report.rowCount);
expect(report.mountedCellCount).toBeGreaterThan(0);
});
});
SHA-256: d90793781fcbaf86a74c8d587eeb87555f74521ced308c40c67d1c24752ce803