Skip to content

Commit

Permalink
Update examples/plugins/src/js-benchmarking/README.md
Browse files Browse the repository at this point in the history
Co-authored-by: Matěj Chalk <[email protected]>
  • Loading branch information
BioPhoton and matejchalk authored Apr 14, 2024
1 parent ca46467 commit e50d7e8
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions examples/plugins/src/js-benchmarking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ You can configure the plugin with the following options:
};
```

3.1. Create benchmark suite:

```ts
// typescript
const suiteConfig = {
suiteName: 'glob',
targetImplementation: 'version-2',
cases: [
['version-1', () => new Promise(resolve => setTimeout(resolve, 30))],
['version-2', () => new Promise(resolve => setTimeout(resolve, 10))],
['version-3', () => new Promise(resolve => setTimeout(resolve, 20))],
],
};
```
1. Create benchmark suite:

```ts
// typescript
const suiteConfig = {
suiteName: 'glob',
targetImplementation: 'version-2',
cases: [
['version-1', () => new Promise(resolve => setTimeout(resolve, 30))],
['version-2', () => new Promise(resolve => setTimeout(resolve, 10))],
['version-3', () => new Promise(resolve => setTimeout(resolve, 20))],
],
};
```

4. (Optional) Set up categories (use `npx code-pushup print-config` to list audits and groups).

Expand Down

0 comments on commit e50d7e8

Please sign in to comment.