vmsilo/bufferbloat-test/default.nix
Davíð Steinn Geirsson 5d8dd10f3d feat(bufferbloat-test): compute avg for Stats metrics in result output
Replace the jq-based result merging (control char strip + jq -s merge)
with a Python script that also calculates avg (sum/count) for all Stats
objects in vm-switch metrics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 16:52:00 +00:00

36 lines
644 B
Nix

{
pkgs,
makeRootfsNixos,
crosvm,
vmSwitch,
}:
let
# Build the benchmark rootfs
rootfs = makeRootfsNixos { guestConfig = import ./guest-config.nix; };
# Get the NixOS system closure for init=
systemToplevel = rootfs.passthru.nixos.config.system.build.toplevel;
mergeScript = ./merge-results.py;
testScript = pkgs.replaceVars ./run-test.sh {
inherit
rootfs
crosvm
vmSwitch
systemToplevel
mergeScript
;
};
in
pkgs.writeShellApplication {
name = "bufferbloat-test";
runtimeInputs = [
pkgs.python3
pkgs.coreutils
];
text = ''
exec bash ${testScript} "$@"
'';
}