Skip to content

Commit d98064e

Browse files
committed
Clean up some dead code in nix/workbench
1 parent fe474cc commit d98064e

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
@@ -13,9 +13,14 @@
1313
}:
1414

1515
with pkgs.lib;
16-
with (import ../lib.nix pkgs.lib);
1716

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

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

0 commit comments

Comments
 (0)