Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into cross-origin-isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Aug 4, 2024
2 parents e01f5d9 + 1d8775c commit 87e319f
Show file tree
Hide file tree
Showing 47 changed files with 2,548 additions and 2,237 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,19 @@ jobs:
browsers: chrome-headless, firefox-headless

- job: macos
# Note macos-11 is currently more recent than macos-latest
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#github-hosted-runners
os: macos-11
os: macos-12
browsers: safari

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: npm

- run: npm ci
# TODO(aomarks) The latest chromedriver has updated to 94, but GitHub
# Actions hasn't updated yet. Pin to the earlier verison of chromedriver
# until GitHub Actions updated.
- run: npm install chromedriver@^93.0.0
- run: npm run build

- run: npm test
Expand All @@ -42,21 +36,21 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: npm
- run: npm ci
- run: npm run lint

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: npm
- run: npm ci
- run: npm run format:check
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,48 @@ project adheres to [Semantic Versioning](http://semver.org/).

<!-- ## Unreleased -->

## [0.7.1] 2024-07-18

- Update jsonwebtoken dependency.

## [0.7.0] 2022-07-15

- [**BREAKING**] Tachometer is now an ES module binary, so it requires Node 12
or higher.
- Upgraded dependencies and removed unnecessary ones.

## [0.6.0] 2022-07-01

- [**BREAKING**] Benchmark and `root` paths are now interpreted relative to the
location of the config file, instead of the current working directory.

For example, a config at path `<repo>/benchmarks/foo/tachometer.json` that
used to look as follows, and had to be run with `<repo>` as the cwd:

```json
{
"root": ".",
"benchmarks": [
{
"url": "benchmarks/foo/index.html"
}
]
}
```

Should now look like this, and can be run from any cwd:

```json
{
"root": "../..",
"benchmarks": [
{
"url": "foo.html"
}
]
}
```

## [0.5.10] 2021-09-27

- The `--horizons` flag and `horizon` config setting has been replaced with
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> tachometer is a tool for running benchmarks in web browsers. It uses repeated
> sampling and statistics to reliably identify even tiny differences in runtime.
###### [Install](#install) | [Usage](#usage) | [Why?](#why) | [Example](#example) | [Features](#features) | [Sampling](#sampling) | [Measurement modes](#measurement-modes) | [Interpreting results](#interpreting=results) | [Swap NPM dependencies](#swap-npm-dependencies) | [JavaScript module imports](#javascript-module-imports) | [Browsers](#browsers) | [Performance traces](#performance-traces) | [Remote control](#remote-control) | [Config file](#config-file) | [CLI usage](#cli-usage)
###### [Install](#install) | [Usage](#usage) | [Why?](#why) | [Example](#example) | [Features](#features) | [Sampling](#sampling) | [Measurement modes](#measurement-modes) | [Interpreting results](#interpreting-results) | [Swap NPM dependencies](#swap-npm-dependencies) | [JavaScript module imports](#javascript-module-imports) | [Browsers](#browsers) | [Performance traces](#performance-traces) | [Remote control](#remote-control) | [Config file](#config-file) | [CLI usage](#cli-usage)

## Install

Expand Down Expand Up @@ -106,7 +106,7 @@ information.
depend on, to compare published versions, remote GitHub branches, or local git
repos.

- [_Automatically sample_](#auto-sampling) until we have enough precision to
- [_Automatically sample_](#auto-sample) until we have enough precision to
answer the question you are asking.

- [_Remote control_](#remote-control) browsers running on different machines
Expand Down Expand Up @@ -742,9 +742,18 @@ performance isolation.
Use the `--config` flag to control tachometer with a JSON configuration file.
Defaults are the same as the corresponding command-line flags.
All paths in a config file are relative to the path of the config file itself.
You will typically want to set `root` to the directory that contains your
package's `node_modules/` folder, so that the web server will be able to resolve
bare-module imports.

For example, a file called `benchmarks/foo/tachometer.json` might look like
this:

```json
{
"root": "./benchmarks",
"root": "../..",
"sampleSize": 50,
"timeout": 3,
"autoSampleConditions": ["0%", "1%"],
Expand Down Expand Up @@ -848,7 +857,7 @@ tach http://example.com
| `--package-version` / `-p` | _(none)_ | Specify an NPM package version to swap in ([details](#swap-npm-dependencies)) |
| `--browser` / `-b` | `chrome` | Which browsers to launch in automatic mode, comma-delimited (chrome, firefox, safari, edge, ie) ([details](#browsers)) |
| `--window-size` | `1024,768` | "width,height" in pixels of the browser windows that will be created |
| `--sample-size` / `-n` | `50` | Minimum number of times to run each benchmark ([details](#sample-size)) |
| `--sample-size` / `-n` | `50` | Minimum number of times to run each benchmark ([details](#minimum-sample-size)) |
| `--auto-sample-conditions` | `0%` | The degrees of difference to try and resolve when auto-sampling ("N%" or "Nms", comma-delimited) ([details](#auto-sample-conditions)) |
| `--timeout` | `3` | The maximum number of minutes to spend auto-sampling ([details](#auto-sample)) |
| `--measure` | `callback` | Which time interval to measure (`callback`, `global`, `fcp`) ([details](#measurement-modes)) |
Expand Down
4 changes: 2 additions & 2 deletions bin/tach.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('../lib/cli.js').main(process.argv);
import {main} from '../lib/cli.js';
main(process.argv);
Loading

0 comments on commit 87e319f

Please sign in to comment.