Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Load test suite for matchmaking, battles and messaging

未关闭
#32 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
45/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
JavaScript
星标
0
派生
2
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sennaicodes/codearena 的其他 Issue

查看 sennaicodes/codearena 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。