Skip to content

Commit fa846d2

Browse files
CopilotBoshen
andcommitted
Use minzippedBytes instead of minifiedBytes for compression ratio calculation
Co-authored-by: Boshen <[email protected]>
1 parent 7cfdc8d commit fa846d2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@ Thumbs.db
6060
.tmp
6161
.temp
6262

63+
# Screenshots
64+
*.png
65+
6366
# Build tools
6467
.turbo

apps/dashboard/src/MinificationBenchmarks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const getLibraryData = (library: string, metric: 'time' | 'compression') => {
2525
} else {
2626
// compression ratio
2727
const originalSize = libraryData.size
28-
const minifiedBytes = minifierData.result.data.minifiedBytes || 0
29-
value = Math.round(((originalSize - minifiedBytes) / originalSize) * 100 * 10) / 10
28+
const minzippedBytes = minifierData.result.data.minzippedBytes || 0
29+
value = Math.round(((originalSize - minzippedBytes) / originalSize) * 100 * 10) / 10
3030
}
3131

3232
data.push({

0 commit comments

Comments
 (0)