# tests: Add an automatic perf profiler \(\#38543\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/782058647db4f1b25d6c04c85728faac557e59cf)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 782058647db4f1b25d6c04c85728faac557e59cf

Requested commit: 782058647db4f1b25d6c04c85728faac557e59cf

Commit: 782058647db4f1b25d6c04c85728faac557e59cf

Tree: dcb2726dba2a2f5253ab571b5e0e884441001b85

Author: Nia

Committer: GitHub

## Message

```
tests: Add an automatic perf profiler (#38543)

Add an auto-profiler for our tests, to hopefully allow better triage of
performance impacts resulting from code changes. Comprehensive usage
docs are in the code.

Currently, it uses hyperfine under the hood and prints markdown to the
command line for all crates with relevant tests enabled. We may want to
expand this to allow outputting json in the future to allow e.g.
automatically comparing the difference between two runs on different
commits, and in general a lot of functionality could be added (maybe
measuring memory usage?).

It's enabled (mostly as an example) on two tests inside `gpui` and a
bunch of those inside `vim`. I'd have happily used `cargo bench`, but that's nightly-only.

Release Notes:

- N/A
```

## Parents

- [be77682a3fd3ace184a9059cc7b212e3ea4891d3](https://git.cafe/gitcafe/zed/commit/be77682a3fd3ace184a9059cc7b212e3ea4891d3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/782058647db4f1b25d6c04c85728faac557e59cf?format=markdown)
