hack for now for JP so it doesn't so such a high percentage

This commit is contained in:
Ethan Roseman 2023-02-18 17:48:21 +09:00
parent be18b9479a
commit ab73741109
No known key found for this signature in database
GPG Key ID: 27F9FCEB8E4969BD

View File

@ -40,8 +40,15 @@ async function fetchData(version) {
}) })
const latest = rows[rows.length - 1] const latest = rows[rows.length - 1]
let totalBytes = latest.totalBytes
// TODO hack for JP since we haven't mapped all the segments
if (version !== "us") {
totalBytes = 3718668
}
for (const row of rows) { for (const row of rows) {
row.percentBytes = (row.matchingBytes / latest.totalBytes) * 100 row.percentBytes = (row.matchingBytes / totalBytes) * 100
} }
return rows return rows