Generate tracy trace from chrome profile
This commit is contained in:
parent
08e875fb33
commit
9c3d91e331
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
nix-shell --run "make -j '$(nproc --all)'"
|
||||||
|
|
||||||
|
workspace=$(mktemp -d)
|
||||||
|
|
||||||
|
function cleanup {
|
||||||
|
rm -rf "${workspace}"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
chromejson="${workspace}"/out.json
|
||||||
|
tracyfile="${workspace}"/out.tracy
|
||||||
|
|
||||||
|
echo "[+] Instantiating derivation"
|
||||||
|
NIX_SHOW_TRACE=1 ./outputs/out/bin/nix-instantiate $@ > "${chromejson}"
|
||||||
|
|
||||||
|
echo "[+] Converting chrome profile to tracy profile"
|
||||||
|
nix-shell -p tracy --run "import-chrome '${chromejson}' '${tracyfile}'"
|
||||||
|
nix-shell -p tracy --run "tracy '${tracyfile}'"
|
|
@ -81,7 +81,8 @@ void processExpr(EvalState & state, const Strings & attrPaths,
|
||||||
if (store2)
|
if (store2)
|
||||||
drvPathS = store2->addPermRoot(drvPath, rootName);
|
drvPathS = store2->addPermRoot(drvPath, rootName);
|
||||||
}
|
}
|
||||||
std::cout << fmt("%s%s\n", drvPathS, (outputName != "out" ? "!" + outputName : ""));
|
// THis is polluting the nice trace we're generating, boo.
|
||||||
|
// std::cout << fmt("%s%s\n", drvPathS, (outputName != "out" ? "!" + outputName : ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue