diff options
-rw-r--r-- | resources/libraries/python/DMAUtil.py | 2 | ||||
-rw-r--r-- | resources/libraries/python/model/parse.py | 14 | ||||
-rw-r--r-- | resources/tools/scripts/rca_console_logs.sh | 25 |
3 files changed, 18 insertions, 23 deletions
diff --git a/resources/libraries/python/DMAUtil.py b/resources/libraries/python/DMAUtil.py index cce60ed7a6..4dfb3cc040 100644 --- a/resources/libraries/python/DMAUtil.py +++ b/resources/libraries/python/DMAUtil.py @@ -137,7 +137,7 @@ class DMAUtil: f" --name={dma_name}_{i} " \ f" --max-batch-size={max_batch_size} " \ f" --max-transfer-size={max_transfer_size} " \ - f" --driver=idxd" + f" --driver=user" exec_cmd_no_error( node, cmd, sudo=True, diff --git a/resources/libraries/python/model/parse.py b/resources/libraries/python/model/parse.py index 1e0aebfe18..6f4505262e 100644 --- a/resources/libraries/python/model/parse.py +++ b/resources/libraries/python/model/parse.py @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Cisco and/or its affiliates. +# Copyright (c) 2025 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -93,19 +93,21 @@ def parse(dirpath: str, fake_value: float = 1.0) -> Dict[str, List[float]]: result_object = data["result"] result_type = result_object["type"] if result_type == "mrr": - results[name] = result_object["receive_rate"]["rate"]["values"] + result_list = result_object["receive_rate"]["rate"]["values"] elif result_type == "ndrpdr": - results[name] = [result_object["pdr"]["lower"]["rate"]["value"]] + result_list = [result_object["pdr"]["lower"]["rate"]["value"]] elif result_type == "soak": - results[name] = [ + result_list = [ result_object["critical_rate"]["lower"]["rate"]["value"] ] elif result_type == "reconf": - results[name] = [result_object["loss"]["time"]["value"]] + result_list = [result_object["loss"]["time"]["value"]] elif result_type == "hoststack": - results[name] = [result_object["bandwidth"]["value"]] + result_list = [result_object["bandwidth"]["value"]] else: raise RuntimeError(f"Unknown result type: {result_type}") + # Negative values from csit/issues/3983 need to be ignored. + results[name] = [float(val) for val in result_list if val >= 0] results = {test_id: results[test_id] for test_id in sorted(results)} with open(resultpath, "wt", encoding="utf8") as file_out: json.dump(results, file_out, indent=1, separators=(", ", ": ")) diff --git a/resources/tools/scripts/rca_console_logs.sh b/resources/tools/scripts/rca_console_logs.sh index a541a3f1cb..bda36b3663 100644 --- a/resources/tools/scripts/rca_console_logs.sh +++ b/resources/tools/scripts/rca_console_logs.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Cisco and/or its affiliates. +# Copyright (c) 2025 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -20,30 +20,26 @@ set +x # Second argument: Pattern to looks for (e.g. identifying release instead of RC2). # Example usage: -# bash rca_console_logs.sh 'https://s3-logs.fd.io/vex-yul-rot-jenkins-1/csit-vpp-perf-report-iterative-2410-2n-spr' '24.10-release' +# bash rca_console_logs.sh 'https://logs.fd.io/vex-yul-rot-jenkins-1/csit-vpp-perf-report-iterative-2502-2n-spr' '2-release' # For each run, this script prints hints on whether skip or look deeper. # Also testbeds are printed, to see possible correlations with failures. jobname="${1}" build_pattern="${2}" -skip_before="${3-1}" -# TODO: Detect last run and go backward? -for i in {1..999}; do - if (( ${i} < ${skip_before} )); then - # Silently skip. - continue - fi +rm -f "index.html" +curl -sf "${jobname}/index.html" > "index.html" +for i in `grep -o '"[0-9]\+/index.html' index.html | cut -d '"' -f 2- | cut -d '/' -f 1 | sort -n`; do if ! curl -sf "${jobname}/${i}/console.log.gz" | zcat > "console.log"; then - echo "${i}: failed to download. No more runs?" - exit 0 + echo "${i}: failed to download. Aborted run?" + continue fi if ! fgrep -q "${build_pattern}" "console.log"; then - echo "${i}: not matching the pattern, skip." + echo "${i}: not matching the pattern. Skip." continue fi if ! grep '.* tests, .* passed, .* failed' "console.log" > "tests.txt"; then - echo "${i}: no tests run? suspicious." + echo "${i}: no tests executed? Suspicious." continue fi final=$(tail -1 "tests.txt" | tee "final.txt") @@ -51,8 +47,6 @@ for i in {1..999}; do echo -ne "${i}: skip ${final}\t\t" else echo -# fgrep '| FAIL' "console.log" | fgrep -v 'Tests' - awk ' /\| FAIL \|/ { if ($0 !~ /Tests/) { @@ -66,7 +60,6 @@ for i in {1..999}; do } } ' "console.log" - echo -ne "${i}: investigate ${final}\t\t" fi # TODO: Simplify this topology detection. |