Skip to content

Commit 9049135

Browse files
committed
fix: make the output table more concise
1 parent d1c1616 commit 9049135

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Benchmark comparing JavaScript bundlers and build tools ([Rspack](https://github
44

55
## Metrics
66

7-
| Name | Description | Notes |
8-
| ------------------ | ----------------------------------------------- | --------------------------------------- |
9-
| **Dev cold start** | Total time from dev server start to page loaded | Equals to server start + page load |
10-
| **Server start** | Time taken for the dev server to start | Include initial build (except for Vite) |
11-
| **Page load** | Time to load the page after server is ready | |
12-
| **Root HMR** | Time to HMR after changing a root module | |
13-
| **Leaf HMR** | Time to HMR after changing a leaf module | |
14-
| **Prod build** | Time taken to build the production bundles | |
15-
| **Total size** | Total size of the bundle | Minified by the default minifier |
16-
| **Gzipped size** | Gzipped size of the bundle | Represents actual network transfer size |
7+
| Name | Description | Notes |
8+
| ------------------ | ----------------------------------------------- | ----------------------------------------- |
9+
| **Dev cold start** | Total time from dev server start to page loaded | Equals to `server start` + `page load` |
10+
| **Server start** | Time taken for the dev server to start | Includes initial build for loaded modules |
11+
| **Page load** | Time to load the page after server is ready | |
12+
| **Root HMR** | Time to HMR after changing a root module | |
13+
| **Leaf HMR** | Time to HMR after changing a leaf module | |
14+
| **Prod build** | Time taken to build the production bundles | |
15+
| **Total size** | Total size of the bundle | Minified by the default minifier |
16+
| **Gzipped size** | Gzipped size of the bundle | Represents actual network transfer size |
1717

1818
## Notes
1919

benchmark.mjs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ async function runBenchmark() {
344344
const loadTime = Date.now() - start;
345345
logger.success(
346346
color.dim(buildTool.name) +
347-
' dev cold start in ' +
347+
' Dev cold start in ' +
348348
color.green(time + loadTime + 'ms'),
349349
);
350350

@@ -563,20 +563,10 @@ logger.success('Benchmark finished!\n');
563563
logger.info('Build performance:\n');
564564
console.log(
565565
markdownTable([
566-
[
567-
'Name',
568-
'Dev cold start',
569-
'Server start',
570-
'Page load',
571-
'Root HMR',
572-
'Leaf HMR',
573-
'Prod build',
574-
],
566+
['Name', 'Dev cold start', 'Root HMR', 'Leaf HMR', 'Prod build'],
575567
...buildTools.map(({ name }) => [
576568
name,
577-
averageResults[name].devColdStart,
578-
averageResults[name].serverStart,
579-
averageResults[name].onLoad,
569+
`${averageResults[name].devColdStart} (${averageResults[name].serverStart} + ${averageResults[name].onLoad})`,
580570
averageResults[name].rootHmr,
581571
averageResults[name].leafHmr,
582572
averageResults[name].prodBuild,

0 commit comments

Comments
 (0)