Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail authored Apr 10, 2024
1 parent d120e67 commit 289d8bd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/performance-impact/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@

Disclaimer: This tool should not be used to catch small performance variations because they are hard to distinguish from the natural variations of performance metrics (see [performance variability](#Performance-variability)).

# Pull request comment
## Pull request comment

_Screenshot of a pull request comment_

![stuff](./docs/pull_request_comment.png)

# Performance variability
## Performance variability

Performance metrics will change due to inherent variability, **even if there hasn't been a code change**.
It can be mitigated by measuring performance multiple times.
But you should always keep in mind this variability before drawing conclusions about a performance-impacting change.

With time you'll be capable to recognize unusual variation in your performance metrics.

# How to catch small performance impacts?
## How to catch small performance impacts?

Catching small to very small performance impacts with confidence requires a LOT of repetition and time. Both strategies means you will have to wait before knowing the real performance impact.
Catching (very) small performance impacts with confidence requires repetition and time. You need to:

_How to catch small impacts with a lot of repetition?_
1. Let your code be used a lot of times in a lot of scenarios and see the results. This could be scripts, real users or both.

- Let your code be used a lot of times in a lot of scenarios and see the results. This could be scripts, real users or both.
2. And or push your performance metrics in a tool like Kibana or DataDog and check the tendency of your performance metrics.

- Push your performance metrics in a tool like Kibana or DataDog and check the tendency of your performance metrics.
In any case it means you have to wait before knowing the real performance impact.

In the end I would recommend the following approach:
## Recommended approach to catch performance impacts

1. measure some performance metrics
2. Use `@jsenv/performance-impact` to anticipate big variations
Expand Down

0 comments on commit 289d8bd

Please sign in to comment.