Skip to content

Commit 1cc31d2

Browse files
authored
Merge pull request #5538 from input-output-hk/andreabedini/workbench/cleanup-dead-code
Clean up some dead code in nix/workbench
2 parents e1a3f4b + d98064e commit 1cc31d2

File tree

7 files changed

+23
-75
lines changed

7 files changed

+23
-75
lines changed

nix/workbench/cluster.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

nix/workbench/forall.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

nix/workbench/lib.jq

Lines changed: 0 additions & 16 deletions
This file was deleted.

nix/workbench/lib.nix

Lines changed: 0 additions & 9 deletions
This file was deleted.

nix/workbench/manifest.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,22 @@ case "${op}" in
171171
local json=${1:?$usage}
172172

173173
jq '
174-
include "lib";
174+
def color:
175+
{ red: "\u001b[31m"
176+
, green: "\u001b[32m"
177+
, yellow: "\u001b[33m"
178+
, blue: "\u001b[34m"
179+
, magenta: "\u001b[35m"
180+
, cyan: "\u001b[36m"
181+
, white: "\u001b[37m"
182+
, off: "\u001b[39m"
183+
};
184+
185+
def colorly($col; $x):
186+
"\(color[$col])\($x)\(color["off"])";
187+
188+
def drop_nulls:
189+
map(select(. != null));
175190
176191
def unwords: join(" ");
177192
def unlines: join("\n");

nix/workbench/profile/prof3-derived.jq

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
include "prof0-defaults";
22
include "genesis";
3-
include "lib";
43

54
## XXX: this is corruption at the highest levels, pure and simple.
65
def default_value_tx_size_estimate:
@@ -102,7 +101,7 @@ def add_derived_params:
102101
| ($shutdown_slots | may_mult($gsis.slot_duration)) as $shutdown_time
103102
| ([ $generator_requested_duration
104103
, $shutdown_time
105-
] | drop_nulls | min) as $generator_duration
104+
] | map(values) | min) as $generator_duration
106105

107106
## Tx count for inferred absolute duration.
108107
## Note that this the workload would take longer, if we saturate the cluster.

nix/workbench/service/nodes.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
}:
1515

1616
with pkgs.lib;
17-
with (import ../lib.nix pkgs.lib);
1817

1918
let
19+
readJSONMay = fp:
20+
let fv = __tryEval (__readFile fp);
21+
in if fv.success
22+
then __fromJSON fv.value
23+
else {};
24+
2025
profileName = profile.name;
2126

2227
eras = [ ## This defines the order of eras -- which is important.

0 commit comments

Comments
 (0)