Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
7ebf5a02d1 Fix variable quoting and profile path in optimized_clang.sh
Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
2025-12-14 15:57:50 +00:00
copilot-swe-agent[bot]
03daab52ec Initial plan 2025-12-14 15:55:30 +00:00
2 changed files with 10 additions and 14 deletions

View File

@@ -13,10 +13,6 @@ import struct
from test.cqlpy import nodetool
from test.cqlpy.util import cql_session
# Module-level constants for test parameters
RUN_COUNT = 200
CPP_EXCEPTION_THRESHOLD = 20
def get_protocol_error_metrics(host) -> int:
result = 0
metrics = requests.get(f"http://{host}:9180/metrics").text
@@ -55,6 +51,7 @@ def cql_with_protocol(host_str, port, creds, protocol_version):
protocol_version=protocol_version,
) as session:
yield session
session.shutdown()
except NoHostAvailable:
yield None
@@ -104,8 +101,8 @@ def debug_exceptions_logging(request, cql):
# If there is a protocol version mismatch, the server should
# raise a protocol error, which is counted in the metrics.
def test_protocol_version_mismatch(scylla_only, debug_exceptions_logging, request, host):
run_count = RUN_COUNT
cpp_exception_threshold = CPP_EXCEPTION_THRESHOLD
run_count = 200
cpp_exception_threshold = 20
cpp_exception_metrics_before = get_cpp_exceptions_metrics(host)
protocol_exception_metrics_before = get_protocol_error_metrics(host)
@@ -144,9 +141,8 @@ def _build_frame(*, opcode: int, stream: int, body: bytes) -> bytearray:
def _send_frame(sock: socket.socket, *, opcode: int, stream: int, body: bytes) -> None:
sock.send(_build_frame(opcode=opcode, stream=stream, body=body))
MAX_RECV_FRAME_SIZE = 4096
def _recv_frame(sock: socket.socket) -> bytes:
return sock.recv(MAX_RECV_FRAME_SIZE)
return sock.recv(4096)
# Many protocol errors are caused by sending malformed messages.
# It is not possible to reproduce them with the Python driver,
@@ -288,8 +284,8 @@ def _protocol_error_impl(
s.close()
def _test_impl(host, flag):
run_count = RUN_COUNT
cpp_exception_threshold = CPP_EXCEPTION_THRESHOLD
run_count = 200
cpp_exception_threshold = 20
cpp_exception_metrics_before = get_cpp_exceptions_metrics(host)
protocol_exception_metrics_before = get_protocol_error_metrics(host)
@@ -350,8 +346,8 @@ def test_process_register_malformed_string_list(scylla_only, no_ssl, debug_excep
# This is to ensure that the protocol exceptions are not cleared or reset
# during the test execution.
def test_no_protocol_exceptions(scylla_only, no_ssl, debug_exceptions_logging, host):
run_count = RUN_COUNT
cpp_exception_threshold = CPP_EXCEPTION_THRESHOLD
run_count = 200
cpp_exception_threshold = 20
cpp_exception_metrics_before = get_cpp_exceptions_metrics(host)
protocol_exception_metrics_before = get_protocol_error_metrics(host)

View File

@@ -123,7 +123,7 @@ _get_distribution_components() {
continue
;;
esac
echo $target
echo "$target"
done
}
@@ -164,7 +164,7 @@ if [[ "${CLANG_BUILD}" = "INSTALL" ]]; then
echo "[clang-stage3] build the compiler applied CSPGO profile"
cd "${CLANG_BUILD_DIR}"
llvm-profdata merge build/csprofiles/default_*.profraw -output=csir.prof
llvm-profdata merge build/profiles/csir-*.profraw -output=csir.prof
llvm-profdata merge ir.prof csir.prof -output=combined.prof
rm -rf build
# linker flags are needed for BOLT