Skip to content
Snippets Groups Projects
Commit 18bbcb12 authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Add a test to demonstrate the quadratic complexity of referrer

  (de)registration, in particular garbage collection (NIX-23).
parent a33b561a
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ gc-concurrent.sh: gc-concurrent.nix gc-concurrent2.nix
TESTS = init.sh hash.sh lang.sh simple.sh dependencies.sh locking.sh parallel.sh \
build-hook.sh substitutes.sh substitutes2.sh fallback.sh nix-push.sh gc.sh \
gc-concurrent.sh verify.sh nix-pull.sh
gc-concurrent.sh verify.sh nix-pull.sh referrers.sh
XFAIL_TESTS =
......
max=5000
reference=$NIX_STORE_DIR/abcdef
touch $reference
(echo $reference && echo && echo 0) | $TOP/src/nix-store/nix-store --register-validity
echo "registering..."
time for ((n = 0; n < $max; n ++)); do
storePath=$NIX_STORE_DIR/$n
touch $storePath
(echo $storePath && echo && echo 1 && echo $reference)
done | $TOP/src/nix-store/nix-store --register-validity
echo "collecting garbage..."
time $TOP/src/nix-store/nix-store --gc 2> /dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment