Skip to content

Instantly share code, notes, and snippets.

@fi3ework
Last active April 4, 2023 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fi3ework/440fd3069f65889bfea5d0c6249d34e2 to your computer and use it in GitHub Desktop.
Save fi3ework/440fd3069f65889bfea5d0c6249d34e2 to your computer and use it in GitHub Desktop.
Benchmark for c90b46e

tldr;

The metrics of benchmarks executed in sequence within the same job in GitHub Action have too much fluctuation, making the metrics unreliable.

Detail

Here's the five benches run for vitejs/vite#12723. Runs agained the commit in PR (c90b46e) and the one (3f4d109) before it. As patak described

We are seeing in sapphi-red/performance-compare, a reduction from ~1650ms to ~1350ms on M1

For this PR, the start time should get performance gain and the build speed remain unchanged. Both commit metrics in each table are sequentially executed within the same container.

I read some articles that also pointed out the performance is not consistent.

The fallback could make vite-benchmark be a CLI tool in users' physical machine to reduce the effort to run benchmark for consistent performance 😅.

Repoisotry:

https://github.com/fi3ework/vite-benchmark

Cases explaining:

Metrics explaining:

  • Dev cold/hot start cost: extracted from "ready in X ms" (cold/hot start)
  • Dev cold/hot bundle cost: extaracted from "bundled in Xms" (cold/hot start)
  • Build cost: extracted from "built in Xs"

Five times result

1

not recorred.

2

image

3

image

4

image

5

image

6

latest on site: https://fi3ework.github.io/vite-benchmark/compare/?compares=vitejs%2Fvite%403f4d109...vitejs%2Fvite%40c90b46e

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment