Fix profiler

This commit is contained in:
James Lambert 2023-12-23 13:45:42 -07:00
parent e9eeb07e42
commit 7c2c1a62d5

View file

@ -215,7 +215,7 @@ function calculateAverage(batch) {
let pixelDiffCount = 0; let pixelDiffCount = 0;
if (current.imageData && next.imageData) { if (current.imageData && next.imageData) {
for (let idx = 0; idx < SCREEN_HT * SCREEN_WD; idx += 3) { for (let idx = 0; idx < SCREEN_HT * SCREEN_WD * 3; idx += 3) {
if (current.imageData[idx + 0] != next.imageData[idx + 0] || if (current.imageData[idx + 0] != next.imageData[idx + 0] ||
current.imageData[idx + 1] != next.imageData[idx + 1] || current.imageData[idx + 1] != next.imageData[idx + 1] ||
current.imageData[idx + 2] != next.imageData[idx + 2]) { current.imageData[idx + 2] != next.imageData[idx + 2]) {
@ -278,7 +278,7 @@ function formatCommandName(command, batch) {
} }
function formatCommand(command, batch) { function formatCommand(command, batch) {
return `${command.elapsedTime} ${formatCommandName(command, batch)}`; return `${command.elapsedTime} ${command.index} ${formatCommandName(command, batch)}`;
} }
for (const batch of profileBatches) { for (const batch of profileBatches) {