diff options
Diffstat (limited to 'editor/scripts/benchmark.js')
| -rw-r--r-- | editor/scripts/benchmark.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/editor/scripts/benchmark.js b/editor/scripts/benchmark.js index 7b04fd1..8838e2b 100644 --- a/editor/scripts/benchmark.js +++ b/editor/scripts/benchmark.js @@ -44,7 +44,6 @@ function Benchmark () { } // Order - const fhigh = new Color(theme.active.f_high).contrast(new Color(theme.active.background)) const fmed = new Color(theme.active.f_med).contrast(new Color(theme.active.background)) const flow = new Color(theme.active.f_low).contrast(new Color(theme.active.background)) @@ -57,6 +56,17 @@ function Benchmark () { if (bmed < blow) { logs.push('flip b_med with b_low') } if (bhigh < bmed) { logs.push('flip b_high with b_med') } + // Distribution + const fsum = fhigh + fmed + flow + document.getElementById('dis_f_high').style.width = `${((fhigh / fsum) * 100).toFixed(2)}%` + document.getElementById('dis_f_med').style.width = `${((fmed / fsum) * 100).toFixed(2)}%` + document.getElementById('dis_f_low').style.width = `${((flow / fsum) * 100).toFixed(2)}%` + + const bsum = bhigh + bmed + blow + document.getElementById('dis_b_high').style.width = `${((bhigh / bsum) * 100).toFixed(2)}%` + document.getElementById('dis_b_med').style.width = `${((bmed / bsum) * 100).toFixed(2)}%` + document.getElementById('dis_b_low').style.width = `${((blow / bsum) * 100).toFixed(2)}%` + const perc = (score / (this.matches().length * 5)) * 100 const cat = errors > 0 ? 'fix errors' : perc === 100 ? 'perfect' : perc > 80 ? 'good' : perc > 75 ? 'average' : 'bad' |
