Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Nov 10, 2023
1 parent ca76dac commit 3f1cb60
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sample/computeBoids/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,15 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
// Periodically update the text for the timer stats
const kNumTimerSamples = 100;
if (t % kNumTimerSamples === 0) {
const avgComputeMicroseconds = Math.round(
computePassDurationSum / kNumTimerSamples / 1000
);
const avgRenderMicroseconds = Math.round(
renderPassDurationSum / kNumTimerSamples / 1000
);
perfDisplay.textContent = `\
avg compute pass duration: ${Math.round(computePassDurationSum / kNumTimerSamples / 1000)}µs
avg render pass duration: ${Math.round(renderPassDurationSum / kNumTimerSamples / 1000)}µs
avg compute pass duration: ${avgComputeMicroseconds}µs
avg render pass duration: ${avgRenderMicroseconds}µs
spare readback buffers: ${spareResultBuffers.length}`;
computePassDurationSum = 0;
renderPassDurationSum = 0;
Expand Down

0 comments on commit 3f1cb60

Please sign in to comment.