From c8bac6ea0f9afb3ec622aa2a579f3bb0f7488ae9 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 14 Sep 2023 22:14:57 +0200 Subject: [PATCH] lib.fileset: Add benchmark for unions --- lib/fileset/benchmark.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/fileset/benchmark.sh b/lib/fileset/benchmark.sh index b68d2fcefe90..79ab890d6e83 100755 --- a/lib/fileset/benchmark.sh +++ b/lib/fileset/benchmark.sh @@ -101,3 +101,7 @@ touch d{0..5}/d{0..5}/d{0..5}/d{0..5}/f{0..5} bench 'toSource { root = ./.; fileset = ./.; }' rm -rf -- * + +touch {0..1000} +bench 'toSource { root = ./.; fileset = unions (mapAttrsToList (name: value: ./. + "/${name}") (builtins.readDir ./.)); }' +rm -rf -- *