mirror of
https://github.com/NixOS/nix.git
synced 2025-12-17 14:31:06 +01:00
parent
01e9f046a8
commit
03bb8f84e0
6 changed files with 47 additions and 12 deletions
22
tests/compression-levels.sh
Normal file
22
tests/compression-levels.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
source common.sh
|
||||
|
||||
clearStore
|
||||
clearCache
|
||||
|
||||
outPath=$(nix-build dependencies.nix --no-out-link)
|
||||
|
||||
cacheURI="file://$cacheDir?compression=xz&compression-level=0"
|
||||
|
||||
nix copy --to $cacheURI $outPath
|
||||
|
||||
FILESIZES=$(cat ${cacheDir}/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}')
|
||||
|
||||
clearCache
|
||||
|
||||
cacheURI="file://$cacheDir?compression=xz&compression-level=5"
|
||||
|
||||
nix copy --to $cacheURI $outPath
|
||||
|
||||
FILESIZES2=$(cat ${cacheDir}/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}')
|
||||
|
||||
[[ $FILESIZES -gt $FILESIZES2 ]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue