Skip to content

Commit 03e1b22

Browse files
committed
WIP: profile workloads
1 parent 68b944b commit 03e1b22

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

nix/workbench/profile/prof0-defaults.jq

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def era_defaults($era):
6363
}
6464
}
6565

66+
, workloads: []
67+
6668
, node:
6769
{ rts_flags_override: []
6870
, heap_limit: null ## optional: heap limit in MB (translates to RTS flag -M)

nix/workbench/profile/prof1-variants.jq

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def all_profile_variants:
392392
| .node.shutdown_on_slot_synced = 1200
393393
) as $for_1200slot
394394
##
395-
### Definition vocabulary: workload
395+
### Definition vocabulary: generator workload
396396
##
397397
| ({}|
398398
.generator.tps = 15
@@ -545,6 +545,21 @@ def all_profile_variants:
545545
| .generator.tx_fee = 940000
546546
) as $plutus_loop_ripemd
547547
##
548+
### Definition vocabulary: custom workloads
549+
##
550+
|
551+
({
552+
workloads: [{
553+
workload_type: "bash"
554+
, service_module: "voting.nix"
555+
, entrypoints: {
556+
generator: "workflow_generator"
557+
, producers: "workflow_producer"
558+
}
559+
}]
560+
}) as $voting_workload
561+
562+
##
548563
### Definition vocabulary: genesis variants
549564
##
550565
|
@@ -953,7 +968,7 @@ def all_profile_variants:
953968
|
954969
# P&T Nomad cluster: 52 nodes, P2P by default - value+voting workload
955970
# Extra splits, benchmarking from 5th epoch (skip 0,1,2,3 / 533 min / 8.88 hs)
956-
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voting *
971+
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voting * $voting_workload *
957972
{analysis: { filters: ["epoch5+", "size-full"] } }
958973
) as $valuevoting_nomadperf_template
959974
|
@@ -962,7 +977,7 @@ def all_profile_variants:
962977
) as $plutusvolt_nomadperf_template
963978
|
964979
# P&T Nomad cluster: 52 nodes, P2P by default - plutus+voting workload
965-
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voting
980+
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voting * $voting_workload
966981
) as $plutusvoting_nomadperf_template
967982
|
968983
# P&T Nomad cluster: 52 nodes, P2P by default - PlutusV3 BLST workload

nix/workbench/service/generator.nix

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,21 @@ let
129129
value = ''
130130
#!${pkgs.stdenv.shell}
131131
132-
############################### VOTING ###############################
133-
############################### VOTING ###############################
134-
############################### VOTING ###############################
135-
${if profile.generator.drep_voting or false
132+
${if profile.workloads != []
136133
then
137-
''
138-
${import ./voting.nix {inherit pkgs profile nodeSpecs;}}
139-
workflow_generator \
140-
${if profile.composition.with_explorer then "explorer" else "node-0"}
141-
''
134+
let workload = builtins.elemAt profile.workloads 0;
135+
service_module = workload.service_module;
136+
entrypoint = workload.entrypoints.generator;
137+
in
138+
''
139+
${import ./${service_module} {inherit pkgs profile nodeSpecs;}}
140+
${entrypoint} \
141+
${if profile.composition.with_explorer then "explorer" else "node-0"}
142+
''
142143
else
143144
''
144145
''
145146
}
146-
############################### VOTING ###############################
147-
############################### VOTING ###############################
148-
############################### VOTING ###############################
149147
150148
${service.script}
151149
'';

0 commit comments

Comments
 (0)