Skip to content

Commit 087a2ff

Browse files
committed
wb | rename trace_forwarding profile field to properly reflect its purpose
1 parent 08cbfbc commit 087a2ff

File tree

14 files changed

+176
-201
lines changed

14 files changed

+176
-201
lines changed

bench/cardano-profile/data/all-profiles-coay.json

+157-157
Large diffs are not rendered by default.

bench/cardano-profile/data/test/chainsync-early-alonzo-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@
284284
"shutdown_on_slot_synced": 38901589,
285285
"shutdown_on_block_synced": null,
286286
"ssd_directory": null,
287+
"trace_forwarding": false,
287288
"tracing_backend": "trace-dispatcher",
288-
"tracer": false,
289289
"utxo_lmdb": false,
290290
"verbatim": {}
291291
},

bench/cardano-profile/data/test/chainsync-early-byron-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@
284284
"shutdown_on_slot_synced": 237599,
285285
"shutdown_on_block_synced": null,
286286
"ssd_directory": null,
287+
"trace_forwarding": false,
287288
"tracing_backend": "trace-dispatcher",
288-
"tracer": false,
289289
"utxo_lmdb": false,
290290
"verbatim": {}
291291
},

bench/cardano-profile/data/test/ci-test-bage.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@
282282
"heap_limit": null,
283283
"shutdown_on_slot_synced": null,
284284
"shutdown_on_block_synced": 3,
285+
"trace_forwarding": true,
285286
"tracing_backend": "trace-dispatcher",
286-
"tracer": true,
287287
"utxo_lmdb": false,
288288
"verbatim": {}
289289
},

bench/cardano-profile/data/test/ci-test-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@
283283
"shutdown_on_slot_synced": null,
284284
"shutdown_on_block_synced": 3,
285285
"ssd_directory": null,
286+
"trace_forwarding": true,
286287
"tracing_backend": "trace-dispatcher",
287-
"tracer": true,
288288
"utxo_lmdb": false,
289289
"verbatim": {}
290290
},

bench/cardano-profile/data/test/ci-test-dense10-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@
283283
"shutdown_on_slot_synced": null,
284284
"shutdown_on_block_synced": 3,
285285
"ssd_directory": null,
286+
"trace_forwarding": true,
286287
"tracing_backend": "trace-dispatcher",
287-
"tracer": true,
288288
"utxo_lmdb": false,
289289
"verbatim": {}
290290
},

bench/cardano-profile/data/test/default-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@
283283
"shutdown_on_slot_synced": null,
284284
"shutdown_on_block_synced": null,
285285
"ssd_directory": null,
286+
"trace_forwarding": true,
286287
"tracing_backend": "trace-dispatcher",
287-
"tracer": true,
288288
"utxo_lmdb": false,
289289
"verbatim": {}
290290
},

bench/cardano-profile/data/test/fast-nomadperf-coay/profile.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@
478478
"shutdown_on_slot_synced": null,
479479
"shutdown_on_block_synced": 1,
480480
"ssd_directory": null,
481+
"trace_forwarding": true,
481482
"tracing_backend": "trace-dispatcher",
482-
"tracer": true,
483483
"utxo_lmdb": false,
484484
"verbatim": {
485485
"EnableP2P": true

bench/cardano-profile/src/Cardano/Benchmarking/Profile/Types.hs

+4-29
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,7 @@ data Node = Node
397397
-- TODO: Move up "EnableP2P". A new level only for this?
398398
, verbatim :: NodeVerbatim
399399

400-
-- TODO: "tracing_backend" is null or has a backend name!
401-
, trace_forwarding :: Bool -- TODO: Rename in workbench/bash from "tracer"
400+
, trace_forwarding :: Bool
402401
, tracing_backend :: String
403402

404403
-- TODO: Create an RTS property.
@@ -411,35 +410,11 @@ data Node = Node
411410
}
412411
deriving (Eq, Show, Generic)
413412

414-
instance Aeson.ToJSON Node where
415-
toJSON n =
416-
Aeson.object
417-
[ "utxo_lmdb" Aeson..= utxo_lmdb n
418-
, "ssd_directory" Aeson..= ssd_directory n
419-
, "verbatim" Aeson..= verbatim n
420-
-- TODO: Rename in workbench/bash to "trace_forwarding".
421-
, "tracer" Aeson..= trace_forwarding n
422-
, "tracing_backend" Aeson..= tracing_backend n
423-
, "rts_flags_override" Aeson..= rts_flags_override n
424-
, "heap_limit" Aeson..= heap_limit n
425-
, "shutdown_on_slot_synced" Aeson..= shutdown_on_slot_synced n
426-
, "shutdown_on_block_synced" Aeson..= shutdown_on_block_synced n
427-
]
413+
instance Aeson.ToJSON Node
428414

429415
instance Aeson.FromJSON Node where
430-
parseJSON =
431-
Aeson.withObject "Node" $ \o -> do
432-
Node
433-
<$> o Aeson..: "utxo_lmdb"
434-
<*> o Aeson..:? "ssd_directory"
435-
<*> o Aeson..: "verbatim"
436-
-- TODO: Rename in workbench/bash to "trace_forwarding".
437-
<*> o Aeson..: "tracer"
438-
<*> o Aeson..: "tracing_backend"
439-
<*> o Aeson..: "rts_flags_override"
440-
<*> o Aeson..: "heap_limit"
441-
<*> o Aeson..: "shutdown_on_slot_synced"
442-
<*> o Aeson..: "shutdown_on_block_synced"
416+
parseJSON = Aeson.genericParseJSON
417+
(Aeson.defaultOptions {Aeson.rejectUnknownFields = True})
443418

444419
-- Properties passed directly to the node(s) "config.json" file.
445420
newtype NodeVerbatim = NodeVerbatim

nix/workbench/backend/nomad-job.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ let
742742
## If using oneTracerPerNode no "tracer volumes" need to be mounted
743743
## (because of no socket sharing between tasks), and tracer files are
744744
## created using templates.
745-
(lib.optionals (profile.node.tracer && oneTracerPerNode) [
745+
(lib.optionals (profile.node.trace_forwarding && oneTracerPerNode) [
746746
## Tracer start.sh script.
747747
{
748748
env = false;
@@ -1016,7 +1016,7 @@ let
10161016
in lib.listToAttrs (
10171017
# If not oneTracerPerNode, an individual tracer task is needed (instead
10181018
# of running a tracer alongside a node with supervisor)
1019-
lib.optionals (profile.node.tracer && !oneTracerPerNode) [
1019+
lib.optionals (profile.node.trace_forwarding && !oneTracerPerNode) [
10201020
{
10211021
name = "tracer";
10221022
value = valueF

nix/workbench/backend/supervisor.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let
2424
profile = profileBundle.profile.value;
2525
nodeSpecs = profileBundle.node-specs.value;
2626
withGenerator = true;
27-
withTracer = profileBundle.profile.value.node.tracer;
27+
withTracer = profileBundle.profile.value.node.trace_forwarding;
2828
withSsh = false;
2929
inetHttpServerPort = "127.0.0.1:9001";
3030
};

nix/workbench/service/generator.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let
5555
then "plutus-datum.json"
5656
else null
5757
;
58-
} // optionalAttrs profile.node.tracer {
58+
} // optionalAttrs profile.node.trace_forwarding {
5959
tracerSocketPath = "../tracer/tracer.socket";
6060
} // optionalAttrs backend.useCabalRun {
6161
executable = "tx-generator";

nix/workbench/service/nodes.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ let
8888
{
8989
inherit (pkgs) lib;
9090
inherit nodeSpec;
91-
inherit (profile.node) tracing_backend tracer;
91+
inherit (profile.node) tracing_backend trace_forwarding;
9292
}
9393
(recursiveUpdate
9494
(recursiveUpdate
@@ -154,7 +154,7 @@ let
154154
operationalCertificate = "../genesis/node-keys/node${toString i}.opcert";
155155
kesKey = "../genesis/node-keys/node-kes${toString i}.skey";
156156
vrfKey = "../genesis/node-keys/node-vrf${toString i}.skey";
157-
} // optionalAttrs profile.node.tracer {
157+
} // optionalAttrs profile.node.trace_forwarding {
158158
tracerSocketPathConnect = mkDefault "../tracer/tracer.socket";
159159
};
160160

nix/workbench/service/tracing.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ lib
22
, nodeSpec
3-
, tracer
3+
, trace_forwarding
44
, tracing_backend
55
}:
66
cfg:
@@ -25,7 +25,7 @@ let
2525
backends = [
2626
"Stdout MachineFormat"
2727
"EKGBackend"
28-
] ++ optional tracer
28+
] ++ optional trace_forwarding
2929
"Forwarder";
3030
};
3131

0 commit comments

Comments
 (0)