diff --git a/nix/workbench/profile/prof0-defaults.jq b/nix/workbench/profile/prof0-defaults.jq index 821ec6a57ca..b9e5e6e29fd 100644 --- a/nix/workbench/profile/prof0-defaults.jq +++ b/nix/workbench/profile/prof0-defaults.jq @@ -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) diff --git a/nix/workbench/profile/prof1-variants.jq b/nix/workbench/profile/prof1-variants.jq index 40940bdaaa8..ee1701f2d36 100644 --- a/nix/workbench/profile/prof1-variants.jq +++ b/nix/workbench/profile/prof1-variants.jq @@ -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 @@ -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 ## | @@ -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 | @@ -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 diff --git a/nix/workbench/service/generator.nix b/nix/workbench/service/generator.nix index 70bd6700b18..24356339f9f 100644 --- a/nix/workbench/service/generator.nix +++ b/nix/workbench/service/generator.nix @@ -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} '';