Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Load test suite for matchmaking, battles and messaging

Đang mở
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js
Lĩnh vực
backend, performance, testing

Hướng nghiên cứu

Start by reading the backend socket protocol and existing test setup, then run the app with npm run dev and CODEARENA_RUNNER=local. Build the suite under backend/loadtest/ to cover matchmaking, battles and messaging, with correctness checks and latency summaries; ensure it refuses non-local targets unless explicitly overridden. Run npm test and node scripts/check-boundary.js, then commit docs/performance.md with real measurements and the first bottleneck found.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement help wanted

Nobody knows how many simultaneous battles one CodeArena backend can handle, or what breaks first. There are no load tests in the repo.

What to do

Add a load test suite in backend/loadtest/ that drives the real socket protocol:

  • Matchmaking: N players join the queue at once at a spread of ratings. Measure time to match and check nobody is matched twice or left behind.
  • Battles: N concurrent battles where both players send throttled code-update events and submit at realistic times. Measure event latency to the opponent and submission round trip.
  • Messaging: bursts of direct and group messages.
  • Use a fake runner for code execution so the test measures CodeArena, not Judge0. A separate mode can hit a real Judge0 to find its limits.
  • One command with flags for scale and duration, plus a summary of p50, p95 and p99 latencies and error counts.

Deliverable beyond the tool

A short report in docs/performance.md: the numbers on a stated machine, the first bottleneck found, and its cause. If the cause is a bug, open an issue or fix it.

Rules

  • The suite must assert correctness, not just measure speed. For example, every battle ends with exactly one result and no player is in two battles.
  • Never runs against production by default. Refuse unless the target is localhost or --i-know-what-im-doing is passed.

Definition of done

  • Runs locally against npm run dev with CODEARENA_RUNNER=local.
  • Report committed with real numbers.
  • npm test and node scripts/check-boundary.js pass.
Ngôn ngữ chính
JavaScript
Star
0
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sennaicodes/codearena

Tất cả issue của sennaicodes/codearena

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.