From 29878259b33db2508566dea862b9767619ff0d5d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 8 Dec 2023 22:30:37 -0800 Subject: feat(tvix/cli): add benchmark for bf286a54bc 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 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/cli/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tvix/cli/default.nix') diff --git a/tvix/cli/default.nix b/tvix/cli/default.nix index 4c4980be76a7..adc1ba08d1ac 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 { -- cgit 1.4.1