mirror of
https://gitlab.com/rensa-nix/devshell.git
synced 2025-12-12 06:10:07 +01:00
18 lines
651 B
Nix
18 lines
651 B
Nix
{inputs, ...}: let
|
|
inherit (inputs) pkgs;
|
|
in {
|
|
bench = pkgs.writeShellApplication {
|
|
name = "benchmark";
|
|
runtimeInputs = [pkgs.hyperfine];
|
|
text = ''
|
|
echo "Comparison cases first:"
|
|
hyperfine -w 5 \
|
|
'nix-instantiate ${inputs.self}/benchmark/shared.nix --quiet --quiet --quiet' \
|
|
'nix-instantiate ${inputs.self}/benchmark/empty.nix --quiet --quiet --quiet'
|
|
echo "Now real benchmark:"
|
|
hyperfine -w 5 \
|
|
'nix-instantiate ${inputs.self}/benchmark/nixpkgs-shell.nix --quiet --quiet --quiet' \
|
|
'nix-instantiate ${inputs.self}/benchmark/devshell.nix --quiet --quiet --quiet'
|
|
'';
|
|
};
|
|
}
|