Skip to content

Commit

Permalink
WIP: profile workloads
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Dec 30, 2024
1 parent a354b9c commit 3213307
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
2 changes: 2 additions & 0 deletions nix/workbench/profile/prof0-defaults.jq
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def era_defaults($era):
}
}

, workloads: []

, node:
{ rts_flags_override: []
, heap_limit: null ## optional: heap limit in MB (translates to RTS flag -M)
Expand Down
21 changes: 18 additions & 3 deletions nix/workbench/profile/prof1-variants.jq
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def all_profile_variants:
| .node.shutdown_on_slot_synced = 1200
) as $for_1200slot
##
### Definition vocabulary: workload
### Definition vocabulary: generator workload
##
| ({}|
.generator.tps = 15
Expand Down Expand Up @@ -545,6 +545,21 @@ def all_profile_variants:
| .generator.tx_fee = 940000
) as $plutus_loop_ripemd
##
### Definition vocabulary: custom workloads
##
|
({
workloads: [{
workload_type: "bash"
, service_module: "voting.nix"
, entrypoints: {
generator: "workflow_generator"
, producers: "workflow_producer"
}
}]
}) as $voting_workload

##
### Definition vocabulary: genesis variants
##
|
Expand Down Expand Up @@ -953,7 +968,7 @@ def all_profile_variants:
|
# P&T Nomad cluster: 52 nodes, P2P by default - value+voting workload
# Extra splits, benchmarking from 5th epoch (skip 0,1,2,3 / 533 min / 8.88 hs)
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voting *
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voting * $voting_workload *
{analysis: { filters: ["epoch5+", "size-full"] } }
) as $valuevoting_nomadperf_template
|
Expand All @@ -962,7 +977,7 @@ def all_profile_variants:
) as $plutusvolt_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - plutus+voting workload
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voting
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voting * $voting_workload
) as $plutusvoting_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - PlutusV3 BLST workload
Expand Down
22 changes: 10 additions & 12 deletions nix/workbench/service/generator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,21 @@ let
value = ''
#!${pkgs.stdenv.shell}
############################### VOTING ###############################
############################### VOTING ###############################
############################### VOTING ###############################
${if profile.generator.drep_voting or false
${if profile.workloads != []
then
''
${import ./voting.nix {inherit pkgs profile nodeSpecs;}}
workflow_generator \
${if profile.composition.with_explorer then "explorer" else "node-0"}
''
let workload = builtins.elemAt profile.workloads 0;
service_module = workload.service_module;
entrypoint = workload.entrypoints.generator;
in
''
${import ./${service_module} {inherit pkgs profile nodeSpecs;}}
${entrypoint} \
${if profile.composition.with_explorer then "explorer" else "node-0"}
''
else
''
''
}
############################### VOTING ###############################
############################### VOTING ###############################
############################### VOTING ###############################
${service.script}
'';
Expand Down

0 comments on commit 3213307

Please sign in to comment.