Skip to content

Commit edeb9ac

Browse files
committed
ci(benchmark): report isolated mode speedup
1 parent 1582d5e commit edeb9ac

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

benchmark/ci-summary.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,26 @@ interface PhaseTimingSuiteResult {
6262
fileSize: number
6363
}
6464

65+
interface GenerationModeComparison {
66+
name: string
67+
inputSize: number
68+
isolated: BenchmarkResult
69+
semantic: BenchmarkResult
70+
speedup: number
71+
}
72+
73+
interface GenerationModeSuiteResult {
74+
name: string
75+
comparisons: GenerationModeComparison[]
76+
totalTimeMs: number
77+
}
78+
6579
interface BenchmarkOutput {
6680
timestamp: string
6781
platform: string
6882
nodeVersion: string
6983
suites: SuiteResult[]
84+
generationModes?: GenerationModeSuiteResult
7085
phaseTimings: PhaseTimingSuiteResult[]
7186
summary: { totalTimeMs: number, totalBenchmarks: number, avgTimeMs: number }
7287
}
@@ -418,6 +433,18 @@ let md = '## Benchmark Results\n\n'
418433
const runtime = typeof globalThis.Bun !== 'undefined' ? `Bun ${(globalThis as any).Bun.version}` : results.nodeVersion
419434
md += `**Platform:** ${results.platform} | **Runtime:** ${runtime} | **Date:** ${results.timestamp.split('T')[0]}\n\n`
420435

436+
if (results.generationModes?.comparisons.length) {
437+
md += '### isolatedDeclarations vs Semantic Generation\n\n'
438+
md += '_Uncached end-to-end declaration generation over identical, fully annotated sources._\n\n'
439+
md += '| Workload | Input | isolatedDeclarations | Semantic | Speedup |\n'
440+
md += '|----------|-------|----------------------|----------|---------|\n'
441+
for (const comparison of results.generationModes.comparisons) {
442+
const status = comparison.speedup >= 2 ? ':green_circle:' : comparison.speedup >= 1 ? ':yellow_circle:' : ':red_circle:'
443+
md += `| ${comparison.name} | ${(comparison.inputSize / 1024).toFixed(0)} KiB | ${fmt(comparison.isolated.avgTimeMs)} | ${fmt(comparison.semantic.avgTimeMs)} | ${status} **${comparison.speedup.toFixed(1)}x** |\n`
444+
}
445+
md += '\n'
446+
}
447+
421448
// --- Cached table ---
422449
const cachedTools: { name: string, getTime: (r: CrossToolResult) => number | null }[] = [
423450
{ name: '**dtsx (cached)**', getTime: r => r.dtsx.avg },

0 commit comments

Comments
 (0)