2025-08-20 09:03:18 +02:00
|
|
|
{inputs, ...}: let
|
|
|
|
|
inherit (inputs) pkgs;
|
|
|
|
|
in {
|
|
|
|
|
bench = pkgs.writeShellApplication {
|
2025-07-31 12:37:19 +02:00
|
|
|
name = "benchmark";
|
2025-08-20 09:03:18 +02:00
|
|
|
runtimeInputs = [pkgs.hyperfine];
|
2025-07-31 12:37:19 +02:00
|
|
|
text = ''
|
|
|
|
|
echo "Comparison cases first:"
|
|
|
|
|
hyperfine -w 3 \
|
|
|
|
|
'nix-instantiate ${inputs.self}/benchmark/shared.nix' \
|
|
|
|
|
'nix-instantiate ${inputs.self}/benchmark/empty.nix'
|
|
|
|
|
echo "Now real benchmark:"
|
|
|
|
|
hyperfine -w 3 \
|
|
|
|
|
'nix-instantiate ${inputs.self}/benchmark/nixpkgs-shell.nix' \
|
|
|
|
|
'nix-instantiate ${inputs.self}/benchmark/devshell.nix'
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
}
|