Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ Cargo.lock
!/Cargo.lock

stress-test/passthrough-dna.dna.json
FlameGraph
*.svg
perf.data*
4 changes: 2 additions & 2 deletions config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ let
# tag will ultimately be current version when it hits holonix
# https://github.com/holochain/holonix/blob/master/release/default.nix#L7
tag = "v${current}";
holonix-version = "v0.0.57";
holonix-sha256 = "0hzk5kdfv77bjvrhdx9rkwyz6vj83895y0afzkw1hl14pwl9658b";
holonix-version = "v0.0.59";
holonix-sha256 = "1dxx4glmrbqkhkxg9n7k106cxj4qsabzx4cvqzsr96al6a57sw0l";
in
rec {

Expand Down
5 changes: 5 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ with holonix.pkgs;
config = config;
}).buildInputs

++ (holonix.pkgs.callPackage ./profiling {
pkgs = holonix.pkgs;
config = config;
}).buildInputs

++ (holonix.pkgs.callPackage ./docker {
pkgs = holonix.pkgs;
}).buildInputs
Expand Down
21 changes: 21 additions & 0 deletions profiling/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ pkgs,config }:
let
name = "hc-sim2h-server-perf";
script-sim2h-server-perf = pkgs.writeShellScriptBin name
''
cd crates/sim2h_server && cargo build -p sim2h_server --release && perf record --call-graph dwarf sim2h_server
'';

script-hc-conductor-perf = pkgs.writeShellScriptBin "hc-conductor-perf"
''
cd crates/holochain && cargo build -p holochain --release && perf record --call-graph dwarf holochain
'';

script-hc-generate-flame-graph = pkgs.writeShellScriptBin "hc-generate-flame-graph"
''
rm -rf FlameGraph && git clone https://github.com/brendangregg/FlameGraph && perf script | perl FlameGraph/stackcollapse-perf.pl | perl FlameGraph/flamegraph.pl > generated-graph.svg
'';
in
{
buildInputs = [ script-sim2h-server-perf script-hc-generate-flame-graph script-hc-conductor-perf];
}