Skip to content

Commit

Permalink
docs: add docs for benchmarking and profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Sep 9, 2024
1 parent 8385216 commit 61807c4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,28 @@ pnpm test:filter packages/my-desired-package/src/my.test.ts
pnpm test -- --coverage --my-other-flag
```

# Benchmarking

We currently use `vitest` 's [bench utility](https://vitest.dev/api/#bench) to run benchmarks. You can run them in both the browser and node environments.

```sh
pnpm bench:node
```

```sh
# run benchmarks for a specific package
pnpm bench:node packages/my-desired-package
```

# Profiling

We currently use [`clinic`](https://clinicjs.org/) to profile and debug our tooling. For instance you can run clinic's flame command to create a flamegraph for a specific package:

```sh
# creates a flamegraph for a specific package
pm_config_package_name=account pnpm clinic:flame // runs flame against the account package
```

### CI Test

During the CI process an automated end-to-end (e2e) test is executed. This test is crucial as it simulates real-world scenarios on the current test-net, ensuring that the changeset maintains the expected functionality and stability.
Expand Down

0 comments on commit 61807c4

Please sign in to comment.