Skip to content

Commit

Permalink
update page
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmandic committed Oct 6, 2023
1 parent 2fd1fcd commit c1f2b8d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pages/benchmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ <h1>SD WebUI Bechmark Data</h1>
const text2url = (text) => text.replace(/((|http|https|ftp):\/\/[\w?=&./-;#~%-]+(?![\w\s?&./;#~%"=-]*>))/g, "<a href='$1' target='_blank'>$1</a>").replace(/(url:)/g, '').replace('updated:', '');
const attrs = (text) => text.replace(/(\w*:\b)/g, "<span style='color: #AAA'>$1 </span>");
const perfSort = (a, b) => {
const a0 = a.split('/');
const b0 = b.split('/');
let a1 = parseFloat(a0[a0.length - 1].trim());
let b1 = parseFloat(b0[b0.length - 1].trim());
if (Number.isNaN(a1)) a1 = 0;
if (Number.isNaN(b1)) b1 = 0;
if (a1 > b1) return 1;
if (b1 > a1) return -1;
const a0 = a.split('/').map((v) => v.trim());
const b0 = b.split('/').map((v) => v.trim());
const amax = a0.reduce((acc, cur) => Math.max(acc, isNaN(cur) ? 0 : parseFloat(cur)), 0);
const bmax = b0.reduce((acc, cur) => Math.max(acc, isNaN(cur) ? 0 : parseFloat(cur)), 0);
if (amax > bmax) return 1;
if (bmax > amax) return -1;
return 0;
};

Expand Down

0 comments on commit c1f2b8d

Please sign in to comment.