typescript-runtime-type-benchmarks
typescript-runtime-type-benchmarks copied to clipboard
feat(web): add rank numbers to benchmark results display
๐ฏ Purpose
This PR adds rank numbers to the benchmark results display in the web interface to make performance comparisons more accessible for presentations and quick analysis.
๐ Changes
- Display rank numbers: Each library now shows its ranking position (e.g.,
#1 typia,#2 ajv) next to the library name - Smart ranking calculation: Rankings are calculated based on average performance across all selected benchmarks
- Multi-sort support: Ranking works correctly with all three sorting modes:
- Fastest: Ranks by average operations per second (descending)
- Alphabetical: Maintains alphabetical order with rank numbers
- Popularity: Ranks by npm weekly downloads
- Performance-aware: When multiple benchmarks are selected, uses average ops/sec for fair comparison
๐ผ๏ธ Visual Impact
Before: Library names displayed without ranking context
After: Clear rank indicators (#1, #2, #3, etc.) make it easy to identify top performers at a glance
๐งช Testing
- โ TypeScript compilation passes
- โ Build process completes successfully
- โ All sorting modes work correctly with rankings
- โ Multi-benchmark averaging works as expected
๐ผ Business Value
Makes benchmark presentations more professional and easier to understand for stakeholders by providing clear performance rankings without requiring detailed analysis of raw numbers.
Closes #2062