diff --git a/profile.sh b/profile.sh new file mode 100755 index 000000000..428809071 --- /dev/null +++ b/profile.sh @@ -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}'" diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index b51f77e8c..0ceaa7688 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -81,7 +81,8 @@ void processExpr(EvalState & state, const Strings & attrPaths, if (store2) 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 : "")); } } }