INNER CODE UNIT · TypeScript

dbArg

SveltyCMS/SveltyCMS · scripts/benchmark-matrix/index.ts:105

const dbArg = process.argv.find((a) => a.startsWith("--db="));
const filterRaw = dbArg ? dbArg.split("=")[1] : null;
const filter = filterRaw ? filterRaw.toLowerCase().split(",").filter(Boolean) : null;
const databases = filter && filter.length > 0 ? DBS.filter((d) => filter.includes(d)) : DBS;
const CONTINUE_ON_ERROR =
  process.argv.includes("--continue-on-error") || process.argv.includes("--continue");

// 🏗️ `--no-build` (documented): trust the existing production build and never
// rebuild mid-run. Matrix runs rebuild automatically when artifacts are missing
// (or when a mid-run cleanup strips the testing harness), which is the right
// default — but it silently costs minutes on a build that is already current.
const NO_BUILD = process.argv.includes("--no-build");

// Auto-discover all test files
const benchmarksDir = path.resolve(process.cwd(), "tests/benchmarks");
const discoveredTestFiles = fs.existsSync(benchmarksDir)
  ? fs
      .readdirSync(benchmarksDir)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…