Skip to content

Commit

Permalink
chore: benchmark fixes (#2033)
Browse files Browse the repository at this point in the history
  • Loading branch information
rprospero authored Jan 9, 2025
1 parent 0305b20 commit 0c99832
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
export LD_LIBRARY_PATH=`pwd`/build/onetbb/lib
nix build -L .#benchmarks
nix run .#benchmarks > all_benchmark_results.json
rm result
nix run -L .#benchmarks > all_benchmark_results.json
cat all_benchmark_results.json
- name: Store benchmark result
Expand Down
6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
pkgs.stdenv.mkDerivation ({
inherit version;
pname = exe-name mpi gui;
src = ./.;
src = builtins.path {
path = ./.;
name = "dissolve-src";
};
buildInputs = base_libs pkgs ++ pkgs.lib.optional mpi pkgs.openmpi
++ pkgs.lib.optionals gui (gui_libs system pkgs)
++ pkgs.lib.optionals checks (check_libs pkgs)
Expand Down Expand Up @@ -208,6 +211,7 @@
for bm in ${self.packages.${system}.benchmarks}/bin/benchmark_*
do
export BENCHNAME=$(basename ${"$"}{bm})_result.json
>&2 echo Running ${"$"}{BENCHNAME}
${"$"}{bm} --benchmark_format=json > $TMP/${"$"}{BENCHNAME}
done
${pkgs.jq}/bin/jq -s '[.[] | to_entries] | flatten | reduce .[] as $dot ({}; .[$dot.key] += $dot.value)' $TMP/benchmark_*.json > $TMP/all_benchmark_results.json
Expand Down

0 comments on commit 0c99832

Please sign in to comment.