impr: withPerformanceCallback on guardedComputePipeline#2424
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (353 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.88, 1.69, 3.59, 5.37, 6.18, 10.26, 17.97, 21.08]
line [0.82, 1.64, 3.47, 5.40, 6.42, 9.66, 17.84, 20.67]
line [0.80, 1.64, 3.36, 5.28, 5.81, 9.92, 18.79, 20.00]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.38, 0.48, 0.64, 0.74, 1.05, 1.07, 1.26, 1.43]
line [0.31, 0.50, 0.63, 0.71, 0.94, 1.04, 1.29, 1.42]
line [0.31, 0.48, 0.59, 0.76, 0.95, 1.09, 1.23, 1.37]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.72, 1.74, 3.79, 5.24, 10.41, 22.63, 48.18, 96.34]
line [0.70, 1.57, 4.08, 5.23, 10.52, 21.83, 47.65, 98.09]
line [0.65, 1.61, 3.64, 5.36, 10.26, 22.45, 46.84, 97.19]
|
There was a problem hiding this comment.
Pull request overview
Extends TgpuGuardedComputePipeline to support performance timing features by delegating withPerformanceCallback / withTimestampWrites to the underlying TgpuComputePipeline, and adds regression tests for the delegation behavior.
Changes:
- Add
withPerformanceCallbackandwithTimestampWritesto theTgpuGuardedComputePipelinepublic type. - Implement delegation in
TgpuGuardedComputePipelineImplby returning a new wrapper over the updated underlying pipeline. - Add vitest coverage to ensure the guarded wrapper calls through to the underlying pipeline methods.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/typegpu/tests/guardedComputePipeline.test.ts | Adds delegation tests for withPerformanceCallback and withTimestampWrites. |
| packages/typegpu/src/core/root/rootTypes.ts | Exposes the new guarded pipeline methods in the public API types and updates related docs. |
| packages/typegpu/src/core/root/init.ts | Implements the new guarded pipeline wrapper methods by delegating to the underlying compute pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cieplypolar Is this ready for review? |
No description provided.