Skip to content

Commit 0b5eb85

Browse files
committed
update readme
1 parent 32d6c28 commit 0b5eb85

File tree

3 files changed

+49
-51
lines changed

3 files changed

+49
-51
lines changed

.github/workflows/benchmark.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Package Manager Benchmarks
2-
on:
2+
on:
33
push:
44
workflow_dispatch:
55
inputs:
@@ -95,7 +95,7 @@ jobs:
9595
needs: [process]
9696
permissions:
9797
contents: write
98-
# if: github.ref == 'refs/heads/main'
98+
if: github.ref == 'refs/heads/main'
9999
steps:
100100
- uses: actions/checkout@v4
101101
- name: Download Results
@@ -108,4 +108,5 @@ jobs:
108108
with:
109109
github_token: ${{ secrets.GITHUB_TOKEN }}
110110
publish_dir: charts
111-
force_orphan: true
111+
force_orphan: true
112+

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright (c) vlt technology, Inc.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:
8+
9+
(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or
10+
(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.
11+
Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.
12+
13+
DISCLAIMER
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ We currently only test the latest `linux` runner which is the most common GitHub
1212
- Storage (SSD): 14 GB
1313
- Workflow label: `ubuntu-latest`
1414

15-
We may add Mac/Windows in the future but it will likely exponentially increase the already slow run time of the suite (**~20min**).
15+
We may add Mac/Windows in the future but it will likely exponentially increase the already slow run time of the suite (**~40min**).
1616

1717
## Overview
1818

1919
The benchmarks measure:
20-
- Project installation times (cold and warm cache)
21-
- Task execution performance
20+
- Per-package installation times
21+
- Total Project installation times
22+
- Run script execution performance
2223
- Standard deviation of results
2324

24-
### Project Types
25+
### Project Types (fixtures)
2526
- Next.js
2627
- Astro
2728
- Svelte
@@ -49,7 +50,7 @@ We do a best-effort job to configure each tool to behave as similar as possible
4950

5051
## Testing Package Installation
5152

52-
The installation tests we run today mimic a cold-cache scenario for a variety of test fixtures (ie. we install the packages of a `next`, `vue`, `svelte` & `astro` starter project). We will likely add lockfile & warm cache tests in the near future.
53+
The installation tests we run today mimic a matrix of different variations (cold cache, warm cache, cold cache with lockfile, etc) for a variety of test fixtures (ie. we install the packages of a `next`, `vue`, `svelte` & `astro` starter project).
5354

5455
#### Supported Tools
5556

@@ -61,7 +62,7 @@ The installation tests we run today mimic a cold-cache scenario for a variety of
6162
- `deno`
6263
- `bun`
6364

64-
## Testing Script Execution (WIP)
65+
## Testing Script Execution
6566

6667
This suite also tests the performance of basic script execution (ex. `npm run foo`). Notably, for any given build, test or deployment task the spawning of the process is a fraction of the overall execution time. That said, this is a commonly tracked workflow by various developer tools as it involves the common set of tasks: startup, filesystem read (`package.json`) & finally, spawning the process/command.
6768

@@ -82,19 +83,26 @@ This suite also tests the performance of basic script execution (ex. `npm run fo
8283

8384
### Local Development
8485

85-
1. Install dependencies:
86+
1. Setup:
87+
88+
1.1 Install `jq` using your OS package manager
89+
1.2 Install `hyperfine`, version >= 1.19.0 is required
90+
1.3 Install package managers and corepack:
91+
```bash
92+
npm install -g npm@latest corepack@latest vlt@latest bun@latest deno@latest nx@latest turbo@latest
93+
```
94+
1.4 Make a new `results` folder:
8695
```bash
87-
bash ./scripts/setup.sh
96+
mkdir -p results
8897
```
8998

9099
2. Run benchmarks:
91100
```bash
92101
# Install and benchmark a specific project
93-
bash ./scripts/install.sh <project> # cold cache
94-
bash ./scripts/install-warm.sh <project> # warm cache
102+
bash ./scripts/benchmark.sh <fixture> <variation>
95103

96-
# Run task execution benchmarks
97-
bash ./scripts/run.sh
104+
# Example: Benchmark Next.js with cold cache
105+
bash ./scripts/benchmark.sh next clean
98106
```
99107

100108
### GitHub Actions
@@ -124,52 +132,26 @@ package-manager: X.XXs (stddev: X.XXs)
124132
### Generated Results
125133

126134
Results are organized by date in the `chart/results/YYYY-MM-DD/` directory:
127-
- `project-cold.json`: Cold cache installation results
128-
- `project-warm.json`: Warm cache installation results
129-
- `task-execution.json`: Task execution benchmark results
135+
- `<fixture>-<variation>.json`: Cold cache installation results
136+
- `<fixture>-<variation>-package-count.json`: The count of packages installed for each package manager for a given fixture and variation
130137
- `index.html`: Interactive visualization
131-
- `styles.css`: Chart styling
132-
- `script.js`: Chart configuration
133138

134139
### Visualization
135140

136141
The generated charts show:
137-
- Installation times for each project type
138-
- Task execution performance
142+
- Per-package installation times for each fixture and variation combination
143+
- Total installation times for each different combination
144+
- Run scripts execution performance
139145
- Standard deviation in tooltips
140-
- Missing data handling
141-
- Responsive design
146+
- Summary table with total installation times and package counts
142147

143-
### GitHub Pages
148+
### View Results Online
144149

145150
Results are automatically deployed to GitHub Pages when running on the main branch:
146-
```
147-
https://<username>.github.io/<repo>/results/
148-
```
149-
150-
Each run creates a new dated directory with its results, making it easy to track performance over time.
151151

152-
## Project Structure
152+
<https://vltpkg.github.io/benchmarks/>
153153

154-
```
155-
.
156-
├── .github/
157-
│ └── workflows/
158-
│ └── benchmark.yaml # GitHub Actions workflow
159-
├── chart/
160-
│ ├── results/ # Generated results
161-
│ ├── index.html # Chart template
162-
│ ├── styles.css # Chart styling
163-
│ └── script.js # Chart configuration
164-
├── scripts/
165-
│ ├── setup.sh # Environment setup
166-
│ ├── install.sh # Cold cache installation
167-
│ ├── install-warm.sh # Warm cache installation
168-
│ ├── run.sh # Task execution
169-
│ ├── process-results.sh # Results processing
170-
│ └── generate-chart.js # Chart generation
171-
└── results/ # Raw benchmark results
172-
```
154+
Each run creates a new dated html file with its results, making it easy to track performance over time.
173155

174156
## Contributing
175157

@@ -181,4 +163,4 @@ Each run creates a new dated directory with its results, making it easy to track
181163

182164
## License
183165

184-
This project is licensed under the MIT License - see the LICENSE file for details.
166+
This project is licensed under the BSD-2-Clause-Patent License - see the LICENSE file for details.

0 commit comments

Comments
 (0)