Commit graph

11 commits

Author SHA1 Message Date
Paul Gschwendtner
d35e7f2a68 build: replace deprecated inquirer with new npm package (#57205)
The new package comes with types by default, and also has a nicer
API.

The old package had broken types and couldn't be used anymore; and
it's deprecated/unmaintained. We did a similar switch in
angular/dev-infra.

PR Close #57205
2024-07-31 16:02:11 +00:00
Arek
278c4a1fcb docs: fix outdated links from docs to contributing-docs folder in markdown documents (#56462)
PR Close #56462
2024-06-17 08:53:17 -07:00
Pawel Kozlowski
b771539eb3 build: improve results logging in perf script (#51902)
Add git references when printing perf comparison results.

PR Close #51902
2023-09-26 09:09:01 -07:00
Paul Gschwendtner
aaad27b8df build: avoid shallow fetch for benchmark comparison (#50851)
Currently when `yarn benchmarks run-compare` is used, the local
repository could be converted to a shallow clone. This is not
a problem but might result in confusion. We avoid this by
not performing a shallow fetch when a comparison is initiated.

The performance gains seem neglegible.

PR Close #50851
2023-06-26 13:37:38 -07:00
Paul Gschwendtner
bdd8813451 build: print benchmark results at the end of yarn benchmarks run invocation (#50816)
We already collect and report benchmark results for comparison runs, but
for normal benchmark runs we should do the same to make the results
more discoverable (and not in the middle of Bazel output).

PR Close #50816
2023-06-23 14:19:17 -07:00
Paul Gschwendtner
254023a03c build: resolve benchmark compare ref from upstream if rev-parse fails
`rev-parse` returns the original ref name in stdout, even if it wasn't
able to resolve the reference. This was preventing the upstream
resolution from never happening- causing `main` to be never resolved
to the actual SHA.
2023-06-19 15:38:06 +02:00
Paul Gschwendtner
619c318dcb build: fix benchmark sha resolution breaking when compare ref is abbreviated (#50767)
When we fetch e.g. `main`, the branch name will not be available
locally, and `rev-parse` will fail later. We can make the logic
more safe by just using `FETCH_HEAD` then.

PR Close #50767
2023-06-19 13:04:02 +00:00
Paul Gschwendtner
17a95dac22 build: resolve benchmark compare SHA from PR branch or upstream remote (#50764)
If we try to resolve the benchmark compare ref (which may be just
`main`), we are just looking inside the PR branch- but that may
not include the `main` SHA. i.e. it's possible to run a comparison
where the PR is slightly behind of the `main` branch, or a comparison
commit from a different branch is used.

We fix this/ and simplify the logic by resolving the SHAs directly in
the TypeScript code, instead of relying on the rather brittle Bash.

Note that current solution still works, but we sometimes may not be able
to resolve to an actual SHA- causing issues as in 864bd72cb2

PR Close #50764
2023-06-19 12:54:54 +00:00
Paul Gschwendtner
1b3202ca3b build: more concise markdown output for benchmark compare results
We only show the full sample results if someone clicks the markdown
details spoiler button. Most of the time only the stats summary is
relevant.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
9a01ac3f49 build: add documentation for running benchmarks
Adds documentation for running benchmarks.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
bb52edee31 build: create script to run benchmarks and perform comparisons (#50745)
This commit creates a new script that solves the following use-cases:

 - Running benchmarks. It's not trivial to figure out the benchmark
   target names, and it's also easy to mess up the right Bazel flags.

 - Performing comparisons. When e.g. working on a runtime senstive
   change, it should be trivial to run benchmarks between the current
   working stage, and a base revision (e.g. `main`).

The script takes care of both these use-cases and comes with a
prompt-based command line tool experience.

The script will also be used by a future GitHub action that can run
comparisons triggered via GitHub PR comment (by trusted team members).

PR Close #50745
2023-06-18 19:32:34 +00:00