Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
default: '["clean", "node_modules", "cache", "cache+node_modules", "cache+lockfile", "cache+lockfile+node_modules", "lockfile", "lockfile+node_modules", "registry-clean", "registry-lockfile"]'
binaries:
description: "The binaries to run the benchmarks on"
default: '"npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,node"'
default: '"npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,vp,node"'
warmup:
description: "The number of warmup runs on each benchmark"
default: "2"
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
contents: read
id-token: write
env:
BENCH_INCLUDE: ${{ fromJson(inputs.binaries || '"npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,node"') }}
BENCH_INCLUDE: ${{ fromJson(inputs.binaries || '"npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,vp,node"') }}
BENCH_WARMUP: ${{ (github.event_name == 'push' && github.ref != 'refs/heads/main') && '1' || (inputs.warmup || '2') }}
BENCH_RUNS: ${{ (github.event_name == 'push' && github.ref != 'refs/heads/main') && '1' || (inputs.runs || '5') }}
steps:
Expand Down
1 change: 1 addition & 0 deletions app/src/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export * from "./svelte.tsx";
export * from "./turbo.tsx";
export * from "./vue.tsx";
export * from "./yarn.tsx";
export * from "./vp.tsx";
export * from "./zpm.tsx";
137 changes: 137 additions & 0 deletions app/src/components/icons/vp.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/src/hooks/use-history-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const PACKAGE_MANAGERS = [
"vlt",
"nx",
"turbo",
"vp",
"node",
"aws",
"cloudsmith",
Expand Down
2 changes: 2 additions & 0 deletions app/src/lib/get-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Pnpm,
Svelte,
Turbo,
Vp,
Vue,
Yarn,
Zpm,
Expand All @@ -34,6 +35,7 @@ const packageManagerMap: Partial<Record<PackageManager, LucideIcon>> = {
nx: Nx,
pnpm: Pnpm,
turbo: Turbo,
vp: Vp,
yarn: Yarn,
berry: Berry,
zpm: Zpm,
Expand Down
1 change: 1 addition & 0 deletions app/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ export function getPackageManagerDisplayName(
if (packageManager === "berry") return "yarn (berry)";
if (packageManager === "zpm") return "yarn (zpm)";
if (packageManager === "turbo") return "turborepo";
if (packageManager === "vp") return "vite+";
if (packageManager === "aws") return "AWS CodeArtifact";
if (packageManager === "cloudsmith") return "Cloudsmith";
if (packageManager === "github") return "GitHub";
Expand Down
9 changes: 9 additions & 0 deletions app/src/types/chart-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type PackageManager =
| "vlt"
| "nx"
| "turbo"
| "vp"
| "node"
| "aws"
| "cloudsmith"
Expand Down Expand Up @@ -50,6 +51,7 @@ export interface PackageManagerVersions {
vlt?: string;
nx?: string;
turbo?: string;
vp?: string;
node?: string;
aws?: string;
cloudsmith?: string;
Expand All @@ -71,6 +73,7 @@ export interface PackageManagerData {
vlt?: number;
nx?: number;
turbo?: number;
vp?: number;
node?: number;
aws?: number;
cloudsmith?: number;
Expand All @@ -86,6 +89,7 @@ export interface PackageManagerData {
vlt_stddev?: number;
nx_stddev?: number;
turbo_stddev?: number;
vp_stddev?: number;
node_stddev?: number;
aws_stddev?: number;
cloudsmith_stddev?: number;
Expand All @@ -101,6 +105,7 @@ export interface PackageManagerData {
vlt_fill?: string;
nx_fill?: string;
turbo_fill?: string;
vp_fill?: string;
node_fill?: string;
aws_fill?: string;
cloudsmith_fill?: string;
Expand All @@ -116,6 +121,7 @@ export interface PackageManagerData {
vlt_count?: number;
nx_count?: number;
turbo_count?: number;
vp_count?: number;
node_count?: number;
aws_count?: number;
cloudsmith_count?: number;
Expand All @@ -131,6 +137,7 @@ export interface PackageManagerData {
vlt_dnf?: boolean;
nx_dnf?: boolean;
turbo_dnf?: boolean;
vp_dnf?: boolean;
node_dnf?: boolean;
aws_dnf?: boolean;
cloudsmith_dnf?: boolean;
Expand Down Expand Up @@ -172,6 +179,7 @@ export interface PackageCountData {
vlt?: PackageCountEntry;
nx?: PackageCountEntry;
turbo?: PackageCountEntry;
vp?: PackageCountEntry;
node?: PackageCountEntry;
aws?: PackageCountEntry;
cloudsmith?: PackageCountEntry;
Expand All @@ -195,6 +203,7 @@ export interface ProcessCountData {
vlt?: PackageCountEntry;
nx?: PackageCountEntry;
turbo?: PackageCountEntry;
vp?: PackageCountEntry;
node?: PackageCountEntry;
aws?: PackageCountEntry;
cloudsmith?: PackageCountEntry;
Expand Down
8 changes: 8 additions & 0 deletions scripts/clean-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ clean_deno_cache() {
fi
}

# Function to safely clean vp cache
clean_vp_cache() {
if command -v vp &> /dev/null; then
vp cache clean >/dev/null 2>&1 || true
fi
}

# Function to clean lockfiles for all package managers
clean_lockfiles() {
echo "Cleaning lockfiles..."
Expand Down Expand Up @@ -137,6 +144,7 @@ clean_all_cache() {
clean_bun_cache
clean_nx_cache
clean_deno_cache
clean_vp_cache
}

clean_build_files() {
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const COLORS = {
vlt: "#000000",
nx: "#3b82f6",
turbo: "#ff1e56",
vp: "#4f30e8",
node: "#84ba64",
};

Expand Down
11 changes: 11 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ echo "hyperfine: $HYPERFINE_VERSION"
echo "Installing package managers and tools..."
npm install -g npm@latest corepack@latest vlt@latest bun@latest deno@latest nx@latest turbo@latest

# Install Vite+ (vp) via its installer script
curl -fsSL https://vite.plus | bash
export PATH="$HOME/.vite-plus/bin:$PATH"
# Persist vp on PATH for subsequent CI steps
if [ -n "${GITHUB_PATH:-}" ]; then
echo "$HOME/.vite-plus/bin" >> "$GITHUB_PATH"
fi

# Configure Package Managers
echo "Configuring package managers..."
corepack enable yarn pnpm
Expand All @@ -63,6 +71,7 @@ BUN_VERSION="$(bun -v)"
DENO_VERSION="$(npm view deno@latest version)"
NX_VERSION="$(npm view nx@latest version)"
TURBO_VERSION="$(npm view turbo@latest version)"
VP_VERSION="$(vp --version 2>/dev/null || echo "unknown")"
NODE_VERSION=$(node -v)

# Output versions
Expand All @@ -76,6 +85,7 @@ echo "bun: $BUN_VERSION"
echo "deno: $DENO_VERSION"
echo "nx: $NX_VERSION"
echo "turbo: $TURBO_VERSION"
echo "vp: $VP_VERSION"
echo "node: $NODE_VERSION"

# Save versions to JSON file
Expand All @@ -90,6 +100,7 @@ echo "{
\"deno\": \"$DENO_VERSION\",
\"nx\": \"$NX_VERSION\",
\"turbo\": \"$TURBO_VERSION\",
\"vp\": \"$VP_VERSION\",
\"node\": \"$NODE_VERSION\"
}" > ./results/versions.json

Expand Down
11 changes: 6 additions & 5 deletions scripts/variations/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ else
fi

# Defines configurable values for the benchmark
BENCH_INCLUDE="${BENCH_INCLUDE:=npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,node}"
BENCH_INCLUDE="${BENCH_INCLUDE:=npm,yarn,berry,zpm,pnpm,vlt,bun,deno,nx,turbo,vp,node}"
BENCH_WARMUP="${BENCH_WARMUP:=2}"
BENCH_RUNS="${BENCH_RUNS:=5}"
# Per-command timeout in seconds (default: 5 minutes).
# If a single install exceeds this, it is killed. hyperfine --ignore-failure
# lets the suite continue; the timed-out run records as a failure.
BENCH_TIMEOUT="${BENCH_TIMEOUT:=300}"
for pm in npm yarn berry zpm pnpm vlt bun deno nx turbo node; do
for pm in npm yarn berry zpm pnpm vlt bun deno nx turbo vp node; do
CHOICE=$(echo "$pm" | tr '[:lower:]' '[:upper:]')
if echo "$BENCH_INCLUDE" | grep -qw "$pm"; then
# Only allow nx, turbo, node if BENCH_VARIATION is "run"
if [[ "$pm" == "nx" || "$pm" == "turbo" || "$pm" == "node" ]]; then
# Only allow nx, turbo, vp, node if BENCH_VARIATION is "run"
if [[ "$pm" == "nx" || "$pm" == "turbo" || "$pm" == "vp" || "$pm" == "node" ]]; then
if [ "$BENCH_VARIATION" = "run" ]; then
eval "BENCH_INCLUDE_${CHOICE}=1"
else
Expand Down Expand Up @@ -76,6 +76,7 @@ BENCH_SETUP_BUN=""
BENCH_SETUP_DENO=""
BENCH_SETUP_NX=""
BENCH_SETUP_TURBO=""
BENCH_SETUP_VP=""
BENCH_SETUP_NODE=""

# Bare install commands (no log redirection) — used by strace process counting
Expand Down Expand Up @@ -128,7 +129,7 @@ collect_package_count() {
ls -la "$BENCH_OUTPUT_FOLDER"

# Prints the output of each install
for pm in npm yarn berry zpm pnpm vlt bun deno nx turbo node; do
for pm in npm yarn berry zpm pnpm vlt bun deno nx turbo vp node; do
if echo "$BENCH_INCLUDE" | grep -qw "$pm"; then
for i in {0..9}; do
echo "-- Reading output of $pm install $i ---"
Expand Down
5 changes: 5 additions & 0 deletions scripts/variations/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BENCH_INSTALL_COMMAND_PNPM="${BENCH_COMMAND_PNPM//\$\{HYPERFINE_ITERATION\}/run}
BENCH_INSTALL_COMMAND_VLT="${BENCH_COMMAND_VLT//\$\{HYPERFINE_ITERATION\}/run}"
BENCH_INSTALL_COMMAND_BUN="${BENCH_COMMAND_BUN//\$\{HYPERFINE_ITERATION\}/run}"
BENCH_INSTALL_COMMAND_DENO="${BENCH_COMMAND_DENO//\$\{HYPERFINE_ITERATION\}/run}"
BENCH_INSTALL_COMMAND_VP="timeout $BENCH_TIMEOUT vp install > $BENCH_OUTPUT_FOLDER/vp-output-run.log 2>&1"
BENCH_INSTALL_PREPARE_NPM="$(prepend_setup "$BENCH_INSTALL_COMMAND_NPM" "$BENCH_SETUP_NPM")"
BENCH_INSTALL_PREPARE_YARN="$(prepend_setup "$BENCH_INSTALL_COMMAND_YARN" "$BENCH_SETUP_YARN")"
BENCH_INSTALL_PREPARE_BERRY="$(prepend_setup "$BENCH_INSTALL_COMMAND_BERRY" "$BENCH_SETUP_BERRY")"
Expand All @@ -26,6 +27,7 @@ BENCH_INSTALL_PREPARE_PNPM="$(prepend_setup "$BENCH_INSTALL_COMMAND_PNPM" "$BENC
BENCH_INSTALL_PREPARE_VLT="$(prepend_setup "$BENCH_INSTALL_COMMAND_VLT" "$BENCH_SETUP_VLT")"
BENCH_INSTALL_PREPARE_BUN="$(prepend_setup "$BENCH_INSTALL_COMMAND_BUN" "$BENCH_SETUP_BUN")"
BENCH_INSTALL_PREPARE_DENO="$(prepend_setup "$BENCH_INSTALL_COMMAND_DENO" "$BENCH_SETUP_DENO")"
BENCH_INSTALL_PREPARE_VP="$(prepend_setup "$BENCH_INSTALL_COMMAND_VP" "$BENCH_SETUP_VP")"

# Run defines its own command scripts to actually run a test
# script in the fixture directory instead of installing packages.
Expand All @@ -37,6 +39,7 @@ BENCH_COMMAND_PNPM="timeout $BENCH_TIMEOUT corepack pnpm@latest run test > $BENC
BENCH_COMMAND_VLT="timeout $BENCH_TIMEOUT vlt run test --view=human > $BENCH_OUTPUT_FOLDER/vlt-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_BUN="timeout $BENCH_TIMEOUT bun run test > $BENCH_OUTPUT_FOLDER/bun-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_DENO="timeout $BENCH_TIMEOUT deno run test > $BENCH_OUTPUT_FOLDER/deno-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_VP="timeout $BENCH_TIMEOUT vp run test > $BENCH_OUTPUT_FOLDER/vp-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_NX="timeout $BENCH_TIMEOUT nx run test > $BENCH_OUTPUT_FOLDER/nx-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_TURBO="timeout $BENCH_TIMEOUT turbo run test --dangerously-disable-package-manager-check --cache-dir=.cache --no-cache > $BENCH_OUTPUT_FOLDER/turbo-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
BENCH_COMMAND_NODE="timeout $BENCH_TIMEOUT node --run test > $BENCH_OUTPUT_FOLDER/node-run-output-\${HYPERFINE_ITERATION}.log 2>&1"
Expand Down Expand Up @@ -66,6 +69,8 @@ hyperfine --ignore-failure \
${BENCH_INCLUDE_BUN:+--command-name="bun" "$BENCH_COMMAND_BUN"} \
${BENCH_INCLUDE_DENO:+--prepare="$BENCH_INSTALL_PREPARE_DENO"} \
${BENCH_INCLUDE_DENO:+--command-name="deno" "$BENCH_COMMAND_DENO"} \
${BENCH_INCLUDE_VP:+--prepare="$BENCH_INSTALL_PREPARE_VP"} \
${BENCH_INCLUDE_VP:+--command-name="vp" "$BENCH_COMMAND_VP"} \
${BENCH_INCLUDE_NX:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true"} \
${BENCH_INCLUDE_NX:+--command-name="nx" "$BENCH_COMMAND_NX"} \
${BENCH_INCLUDE_TURBO:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true"} \
Expand Down