ghostai1 commited on
Commit
414b6af
·
verified ·
1 Parent(s): 568e14c

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +13 -1
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
+ }