Spaces:
Running
Running
Update script.js
Browse files
script.js
CHANGED
@@ -74,4 +74,16 @@ new Chart(ctx, {
|
|
74 |
legend: { labels: { color: '#ffffff' } }
|
75 |
}
|
76 |
}
|
77 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
legend: { labels: { color: '#ffffff' } }
|
75 |
}
|
76 |
}
|
77 |
+
});
|
78 |
+
|
79 |
+
// Performance calculator
|
80 |
+
function calculatePerformance() {
|
81 |
+
const gpuTime = parseFloat(document.getElementById('gpuSelect').value);
|
82 |
+
const frameCount = parseInt(document.getElementById('frameCount').value) || 75;
|
83 |
+
const teacache = document.getElementById('teacacheCheck').checked;
|
84 |
+
const multiplier = teacache ? 0.6 : 1; // 40% reduction with teacache
|
85 |
+
const totalTime = gpuTime * frameCount * multiplier;
|
86 |
+
const minutes = Math.floor(totalTime / 60);
|
87 |
+
const seconds = Math.round(totalTime % 60);
|
88 |
+
document.getElementById('perfResult').innerText = `Estimated Time: ${minutes}m ${seconds}s for ${frameCount} frames`;
|
89 |
+
}
|