Skip to content

Commit 1a4fb64

Browse files
move performance testing doc
1 parent c5fdc99 commit 1a4fb64

2 files changed

Lines changed: 18 additions & 65 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Guide to writing performance tests for p5.js source code. -->
2+
3+
# Performance Testing
4+
5+
Performance testing is an essential part of measuring how fasst isolated code paths take to execute under a known range of conditions.
6+
7+
Implementation notes:
8+
9+
- All pre-existing benchmarks included the full p5 instance setup which adds ~50ms to each test. The typography performance tests show how to isolate performance testing away from setup overhead.
10+
- The `textToPoints() single word, with render` test draws the calculated points, others just run `textToPoints()`.
11+
12+
## Typography Tests
13+
14+
To isolate typography tests, run the following:
15+
16+
```shell
17+
npx vitest bench test/bench/typography.bench.js --reporter=verbose
18+
```

test/bench/REPORTS/WIP_REPORT_TYPOGRAPHY_TEST.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)