about summary refs log tree commit diff
path: root/tvix/cli/default.nix
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-09T06·30-0800
committerclbot <clbot@tvl.fyi>2023-12-12T14·28+0000
commit29878259b33db2508566dea862b9767619ff0d5d (patch)
tree63a706f2889d200b6cdf5df3d735db9d0c6df86b /tvix/cli/default.nix
parent27c07b72c64cba129cc42507fb5e26398031924d (diff)
feat(tvix/cli): add benchmark for bf286a54bc r/7171
cl/7558 used this expression as a benchmark to justify the introduction
of LightSpan::Delayed:

  builtins.length (builtins.attrNames (import ${pkgs.path} {}))

Let's add it as a benchmark case so it can be referenced easily.

Benchmark: {"nixpkgs-attrnames":{"kbytes":"233824","system":"0.32","user":"2.02"}}
Change-Id: Idb6c69ddd284605dd3b5fd9ac5c79a69b9a470b7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10253
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/cli/default.nix')
-rw-r--r--tvix/cli/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/cli/default.nix b/tvix/cli/default.nix
index 4c4980be76..adc1ba08d1 100644
--- a/tvix/cli/default.nix
+++ b/tvix/cli/default.nix
@@ -76,6 +76,8 @@ let
     benchmark-cross-hello = (mkNixpkgsBenchmark "pkgsCross.aarch64-multiplatform.hello.outPath");
     benchmark-firefox = (mkNixpkgsBenchmark "firefox.outPath");
     benchmark-cross-firefox = (mkNixpkgsBenchmark "pkgsCross.aarch64-multiplatform.firefox.outPath");
+    # Example used for benchmarking LightSpan::Delayed in commit bf286a54bc2ac5eeb78c3d5c5ae66e9af24d74d4
+    benchmark-nixpkgs-attrnames = (mkExprBenchmark { expr = "builtins.length (builtins.attrNames (import ${pkgs.path} {}))"; description = "nixpkgs-attrnames"; });
   };
 in
 {