Tldraw/packages/tldraw/src/test
Steve Ruiz b5c87ab876
Performance measurement tool (for unit tests) (#3447)
This PR adds a micro benchmarking utility. We can use it in our jest
tests or in random scripts, though given the other requirements of our
library, benchmarking.

<img width="750" alt="Screenshot 2024-04-11 at 2 44 23 PM"
src="https://github.com/tldraw/tldraw/assets/23072548/6bba07eb-65fd-45a2-abd8-ddd0e206b9fa">


## What this isn't

This is not benchmarking. The speeds etc are based on your machine.

## What this is

This is a tool for measuring / comparing different implementations etc.
Some things run much faster than others.

### Change Type

- [x] `sdk`
- [x] `internal`
2024-04-11 15:31:21 +00:00
..
__snapshots__ Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00
commands Fix SVG exports in Next.js (#3446) 2024-04-11 14:02:05 +00:00
perf Performance measurement tool (for unit tests) (#3447) 2024-04-11 15:31:21 +00:00
testutils Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
ui Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
ClickManager.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
Editor.test.tsx Use canvas bounds for viewport bounds (#2798) 2024-02-12 15:03:25 +00:00
EraserTool.test.ts No impure getters pt8 (#2221) 2023-11-14 16:32:27 +00:00
HandTool.test.ts StateNode atoms (#2213) 2023-11-14 13:02:50 +00:00
HighlightShape.test.ts No impure getters pt3 (#2203) 2023-11-13 14:31:27 +00:00
LaserTool.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
SelectTool.test.ts Fix blur bug in editable text (#3343) 2024-04-03 15:41:56 +00:00
TLSessionStateSnapshot.test.ts Update the project to Node 20 (#2691) 2024-01-31 16:53:40 +00:00
TLUserPreferences.test.ts Start scrolling if we are dragging close to the window edges. (#2299) 2023-12-15 23:37:03 +00:00
TestEditor.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
TestEditor.ts Input buffering (#3223) 2024-04-02 14:29:14 +00:00
TldrawEditor.test.tsx Roundup fixes (#2862) 2024-02-19 14:52:43 +00:00
ZoomTool.test.ts No impure getters pt6 (#2218) 2023-11-14 11:57:43 +00:00
arrowBindingsIndex.test.tsx [improvements] arrows x enclosing shapes x precision. (#2265) 2023-12-01 21:34:12 +00:00
arrows-megabus.test.tsx Maintain bindings whilst translating arrows (#2424) 2024-01-13 20:09:05 +00:00
assets.test.ts Custom Tools DX + screenshot example (#2198) 2023-11-15 18:06:02 +00:00
bookmark-shapes.test.ts `ShapeUtil.getGeometry`, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
cleanup.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
cropping.test.ts Custom Tools DX + screenshot example (#2198) 2023-11-15 18:06:02 +00:00
customSnapping.test.tsx Add line IDs & fractional indexes (#2890) 2024-02-21 10:06:14 +00:00
drawing.test.ts Revert perf changes (#3217) 2024-03-21 10:05:44 +00:00
duplicate.test.ts Improved duplication (#2480) 2024-01-26 14:54:52 +00:00
flipShapes.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
frames.test.ts Fix frames not preserving shape order (#2928) 2024-02-23 11:25:13 +00:00
getCulledShapes.test.tsx Perf: Incremental culled shapes calculation. (#3411) 2024-04-10 10:29:11 +00:00
getShapeAtPoint.test.ts Fix arrow handle snapping, snapping to text labels, selection of text labels (#1910) 2023-09-18 14:59:27 +00:00
getSnapLines.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
groups.test.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
middleMouseButtonPanning.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
modifiers.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
panning.test.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
parentsToChildrenWithIndexes.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
paste.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
renderingShapes.test.tsx Perf: Incremental culled shapes calculation. (#3411) 2024-04-10 10:29:11 +00:00
resizeBox.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
resizing.test.ts Split snap manager into ShapeBoundsSnaps and HandleSnaps (#2747) 2024-02-07 10:40:01 +00:00
rotating.test.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
roundedBox.ts [tech debt] Primitives renaming party / cleanup (#2396) 2024-01-03 12:13:15 +00:00
select.test.tsx StateNode atoms (#2213) 2023-11-14 13:02:50 +00:00
selection-omnibus.test.ts [feature] wrap mode (#2938) 2024-02-29 11:45:02 +00:00
shapeIdsInCurrentPage.test.ts no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
shapeutils.test.ts StateNode atoms (#2213) 2023-11-14 13:02:50 +00:00
spacebarPanning.test.ts Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
styles2.test.tsx no impure getters pt 11 (#2236) 2023-11-16 15:34:56 +00:00
styles3.test.ts Rename shapes apis (#1787) 2023-08-02 18:12:25 +00:00
test-jsx.tsx [Snapping 3/5] Custom snapping API (#2793) 2024-02-15 15:10:04 +00:00
text.test.ts Rename shapes apis (#1787) 2023-08-02 18:12:25 +00:00
translating.test.ts Input buffering (#3223) 2024-04-02 14:29:14 +00:00
viewport-following.test.ts history options / markId / createPage (#1796) 2023-08-05 11:21:07 +00:00