Skip to content

Commit

Permalink
Update perf display style
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Nov 22, 2023
1 parent 4987544 commit 3098e74
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sample/computeBoids/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {

const perfDisplayContainer = document.createElement('div');
perfDisplayContainer.style.color = 'white';
perfDisplayContainer.style.background = 'black';
perfDisplayContainer.style.backdropFilter = 'blur(10px)';
perfDisplayContainer.style.position = 'absolute';
perfDisplayContainer.style.top = '10px';
perfDisplayContainer.style.bottom = '10px';
perfDisplayContainer.style.left = '10px';
perfDisplayContainer.style.textAlign = 'left';

const perfDisplay = document.createElement('pre');
perfDisplay.style.margin = '.5em';
perfDisplayContainer.appendChild(perfDisplay);
if (canvas.parentNode) {
canvas.parentNode.appendChild(perfDisplayContainer);
Expand Down Expand Up @@ -335,8 +336,8 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
);
perfDisplay.textContent = `\
avg compute pass duration: ${avgComputeMicroseconds}µs
avg render pass duration: ${avgRenderMicroseconds}µs
spare readback buffers: ${spareResultBuffers.length}`;
avg render pass duration: ${avgRenderMicroseconds}µs
spare readback buffers: ${spareResultBuffers.length}`;
computePassDurationSum = 0;
renderPassDurationSum = 0;
timerSamples = 0;
Expand Down

0 comments on commit 3098e74

Please sign in to comment.