bscpkgs/garlic/ds/perf/stat.nix
Rodrigo Arias Mallo 14fbb1499b ds: add perf stat parser
We can only read one output file by now, located at:
.garlic/perf.csv
2021-03-05 18:29:43 +01:00

24 lines
344 B
Nix

{
stdenv
, python3
, gzip
}:
resultTree:
stdenv.mkDerivation {
name = "perf-stat.json.gz";
preferLocalBuild = true;
src = ./stat.py;
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
cp $src stat.py
'';
buildInputs = [ python3 gzip ];
installPhase = ''
python stat.py ${resultTree} | gzip > $out
'';
}