Skip to content

Commit

Permalink
eval-config: regenerate "eval-config.yaml"
Browse files Browse the repository at this point in the history
We now have a "generate_eval_config.py" tool that can update an existing
eval-config.yaml.

It is reasonable to start with the eval-config.yaml we have commited in
git. And it's useful to be able to compare (diff) the result of the
generate command with the orignal file. For that, the orginal file
should not be written by hand, but be formatted the same way, so that
the diff is smaller.

Regenerate the file with:

  ./generate_eval_config.py --config eval-config.yaml --output eval-config.yaml

Also, add a unit test to ensure it stays in sync.
  • Loading branch information
thom311 committed Dec 5, 2024
1 parent 281aebf commit f68db1d
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 62 deletions.
121 changes: 59 additions & 62 deletions eval-config.yaml
Original file line number Diff line number Diff line change
@@ -1,294 +1,291 @@
# Use `generate_eval_config.py` to update the configuration based on earlier
# runs.
IPERF_TCP:
- id: 1 # POD_TO_POD_SAME_NODE
- id: POD_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold_rx: 18
threshold_tx: 18
- id: 2 # POD_TO_POD_DIFF_NODE
threshold: 18
- id: POD_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 3 # POD_TO_HOST_SAME_NODE
- id: POD_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 4 # POD_TO_HOST_DIFF_NODE
- id: POD_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 5 # POD_TO_CLUSTER_IP_TO_POD_SAME_NODE
- id: POD_TO_CLUSTER_IP_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 6 # POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE
- id: POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 7 # POD_TO_CLUSTER_IP_TO_HOST_SAME_NODE
- id: POD_TO_CLUSTER_IP_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 8 # POD_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
- id: POD_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 9 # POD_TO_NODE_PORT_TO_POD_SAME_NODE
- id: POD_TO_NODE_PORT_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 10 # POD_TO_NODE_PORT_TO_POD_DIFF_NODE
- id: POD_TO_NODE_PORT_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 11 # POD_TO_NODE_PORT_TO_HOST_SAME_NODE
- id: POD_TO_NODE_PORT_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 12 # POD_TO_NODE_PORT_TO_HOST_DIFF_NODE
- id: POD_TO_NODE_PORT_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 13 # HOST_TO_HOST_SAME_NODE
- id: HOST_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 14 # HOST_TO_HOST_DIFF_NODE
- id: HOST_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 15 # HOST_TO_POD_SAME_NODE
- id: HOST_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 16 # HOST_TO_POD_DIFF_NODE
- id: HOST_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 17 # HOST_TO_CLUSTER_IP_TO_POD_SAME_NODE
- id: HOST_TO_CLUSTER_IP_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 18 # HOST_TO_CLUSTER_IP_TO_POD_DIFF_NODE
- id: HOST_TO_CLUSTER_IP_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 19 # HOST_TO_CLUSTER_IP_TO_HOST_SAME_NODE
- id: HOST_TO_CLUSTER_IP_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 20 # HOST_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
- id: HOST_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 21 # HOST_TO_NODE_PORT_TO_POD_SAME_NODE
- id: HOST_TO_NODE_PORT_TO_POD_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 22 # HOST_TO_NODE_PORT_TO_POD_DIFF_NODE
- id: HOST_TO_NODE_PORT_TO_POD_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 23 # HOST_TO_NODE_PORT_TO_HOST_SAME_NODE
- id: HOST_TO_NODE_PORT_TO_HOST_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 24 # HOST_TO_NODE_PORT_TO_HOST_DIFF_NODE
- id: HOST_TO_NODE_PORT_TO_HOST_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 18
- id: 25 # POD_TO_EXTERNAL
- id: POD_TO_EXTERNAL
Normal:
threshold: 18
Reverse:
threshold: 10
- id: 26 # HOST_TO_EXTERNAL
- id: HOST_TO_EXTERNAL
Normal:
threshold: 18
Reverse:
threshold: 10
- id: 27 # POD_TO_POD_2ND_INTERFACE_SAME_NODE
- id: POD_TO_POD_2ND_INTERFACE_SAME_NODE
Normal:
threshold: 18
Reverse:
threshold: 10
- id: 28 # POD_TO_POD_2ND_INTERFACE_DIFF_NODE
- id: POD_TO_POD_2ND_INTERFACE_DIFF_NODE
Normal:
threshold: 18
Reverse:
threshold: 10
- id: 29 # POD_TO_POD_MULTI_NETWORK_POLICY
- id: POD_TO_POD_MULTI_NETWORK_POLICY
Normal:
threshold: 18
Reverse:
threshold: 10
IPERF_UDP:
- id: 1 # POD_TO_POD_SAME_NODE
- id: POD_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 2 # POD_TO_POD_DIFF_NODE
- id: POD_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 3 # POD_TO_HOST_SAME_NODE
- id: POD_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 4 # POD_TO_HOST_DIFF_NODE
- id: POD_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 5 # POD_TO_CLUSTER_IP_TO_POD_SAME_NODE
- id: POD_TO_CLUSTER_IP_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 6 # POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE
- id: POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 7 # POD_TO_CLUSTER_IP_TO_HOST_SAME_NODE
- id: POD_TO_CLUSTER_IP_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 8 # POD_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
- id: POD_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 9 # POD_TO_NODE_PORT_TO_POD_SAME_NODE
- id: POD_TO_NODE_PORT_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 10 # POD_TO_NODE_PORT_TO_POD_DIFF_NODE
- id: POD_TO_NODE_PORT_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 11 # POD_TO_NODE_PORT_TO_HOST_SAME_NODE
- id: POD_TO_NODE_PORT_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 12 # POD_TO_NODE_PORT_TO_HOST_DIFF_NODE
- id: POD_TO_NODE_PORT_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 13 # HOST_TO_HOST_SAME_NODE
- id: HOST_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 14 # HOST_TO_HOST_DIFF_NODE
- id: HOST_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 15 # HOST_TO_POD_SAME_NODE
- id: HOST_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 16 # HOST_TO_POD_DIFF_NODE
- id: HOST_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 17 # HOST_TO_CLUSTER_IP_TO_POD_SAME_NODE
- id: HOST_TO_CLUSTER_IP_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 18 # HOST_TO_CLUSTER_IP_TO_POD_DIFF_NODE
- id: HOST_TO_CLUSTER_IP_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 19 # HOST_TO_CLUSTER_IP_TO_HOST_SAME_NODE
- id: HOST_TO_CLUSTER_IP_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 20 # HOST_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
- id: HOST_TO_CLUSTER_IP_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 21 # HOST_TO_NODE_PORT_TO_POD_SAME_NODE
- id: HOST_TO_NODE_PORT_TO_POD_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 22 # HOST_TO_NODE_PORT_TO_POD_DIFF_NODE
- id: HOST_TO_NODE_PORT_TO_POD_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 23 # HOST_TO_NODE_PORT_TO_HOST_SAME_NODE
- id: HOST_TO_NODE_PORT_TO_HOST_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 24 # HOST_TO_NODE_PORT_TO_HOST_DIFF_NODE
- id: HOST_TO_NODE_PORT_TO_HOST_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 25 # POD_TO_EXTERNAL
- id: POD_TO_EXTERNAL
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 26 # HOST_TO_EXTERNAL
- id: HOST_TO_EXTERNAL
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 27 # POD_TO_POD_2ND_INTERFACE_SAME_NODE
- id: POD_TO_POD_2ND_INTERFACE_SAME_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 28 # POD_TO_POD_2ND_INTERFACE_DIFF_NODE
- id: POD_TO_POD_2ND_INTERFACE_DIFF_NODE
Normal:
threshold: 5
Reverse:
threshold: 5
- id: 29 # POD_TO_POD_MULTI_NETWORK_POLICY
- id: POD_TO_POD_MULTI_NETWORK_POLICY
Normal:
threshold: 5
Reverse:
Expand Down
14 changes: 14 additions & 0 deletions tests/test_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,17 @@ def test_generate_eval_config(tmp_path: pathlib.Path) -> None:
tmp_file,
)
_assert_filecmp(tmp_file, _test_file("generate-eval-config-output3.yaml"))


def test_eval_config_yaml(tmp_path: pathlib.Path) -> None:

tmp_file = tmp_path / "tmp-eval-config1.yaml"

_run_generate_eval_config(
[
"--config",
EVAL_CONFIG_FILE,
],
tmp_file,
)
_assert_filecmp(tmp_file, EVAL_CONFIG_FILE)

0 comments on commit f68db1d

Please sign in to comment.