Fix kotlin-ktor benchmark CI failures (see #472)#506
Fix kotlin-ktor benchmark CI failures (see #472)#506yalishevant wants to merge 12 commits intorenaissance-benchmarks:masterfrom
Conversation
Kotlin plugin for SBT was added. All dependencies specified
…ue to the conflicts
Fix validation mismatch caused by floating-point vs integer arithmetic when computing expected task counts. The validator used floating-point multiplication while ClientManager.assignTasks uses .toInt() truncation, producing different results on hosts with odd CPU counts (e.g., macOS CI runners with 3 vCPUs: expected 450 vs actual 400). Replace fragile transitive dependencies (ktor-server-tests-jvm, ktor-server-auth-jvm) with explicit ones that the benchmark actually uses: ktor-server-websockets-jvm, ktor-server-default-headers-jvm, ktor-client-core-jvm, ktor-client-cio-jvm. Also fix the ktor-server-call-logging artifact to use the -jvm variant. Use 127.0.0.1 instead of localhost in both server and client to avoid DNS resolution issues in containerized CI environments. Add a socket-based server readiness check before creating WebSocket clients to prevent races on slow CI hosts. Add a 30-second timeout to waitForMessage to prevent indefinite hangs if a frame is never received. Remove stale output.csv and output.json that were committed by mistake.
|
Hi @vhotspur, could you please approve the workflow run for this PR (and for #507)? This is a continuation of #472 — I've fixed the CI failures that @nomisRev encountered (validation mismatch on odd CPU counts, fragile transitive dependencies, server startup race condition). All checks pass locally, including base/standalone/JMH modes with different client counts. |
|
Just a gentle ping — all 21 CI checks are passing across the full matrix (as well as in #507). Would be great if you could take a look when you get a chance 🙂 Happy to address any feedback! |
Thanks for pushing this through! I'll have a look. |
Summary
Fixes CI failures in the kotlin-ktor benchmark originally introduced in #472 by @zavidnyi and continued by @nomisRev.
The benchmark worked locally but failed on all CI platforms. Root causes:
ClientManager.assignTasksuses.toInt()truncation. On macOS CI runners (3 vCPUs), this produced a mismatch (expected 450 vs actual 400).ktor-server-tests-jvmandktor-server-auth-jvmpulled in classes the benchmark actually needs (WebSockets, DefaultHeaders, client CIO) as transitive deps. Replaced with explicit dependencies.localhostcan be unreliable in containerized environments. Switched to127.0.0.1in both server and client.waitForMessagehad no timeout, risking CI job timeouts. Added a 30-second timeout viawithTimeout.output.csvandoutput.jsoncommitted by mistake.