INNER CODE UNIT · TypeScript

entries

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

    const entries = raw.map((line) => JSON.parse(line));

    const groups: Record<string, number[]> = {};
    for (const e of entries) {
      if (e.testFile && e.wallClockMs && e.status === "SUCCESS") {
        const baseName = path.basename(e.testFile).replace(".test.ts", "");
        if (!groups[baseName]) groups[baseName] = [];
        groups[baseName].push(e.wallClockMs);
      }
    }

    for (const [testFile, times] of Object.entries(groups)) {
      const avgSec = times.reduce((a, b) => a + b, 0) / times.length / 1000;
      weights[testFile] = Math.max(avgSec, 1);
    }
  } catch {
    // fallback
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…