Skip to content

Build Performance & Load Testing Suite #70

Description

@Kalchaqui

Issue: Build Performance & Load Testing Suite

Depends on: A deployable backend build (pnpm run build) and a staging/local instance to target

Task Description

Evaluate the backend's performance under realistic workloads to identify bottlenecks before production, focusing on the Agreement API under increasing load and concurrency.

Deliverable

A performance & load testing suite with documented benchmarks and a summary report, kept separate from the Jest unit/integration suites (load tools must not run in the standard CI test job).

Requirements

Measure:

  • API response times (create/read/update agreement, GET /agreements/:id/activity).
  • Database performance (Supabase query latency under load).
  • Concurrent Agreement creation and concurrent Agreement updates.
  • Activity logging throughput.
  • Memory consumption and CPU utilization.

Generate a performance report summarizing results.

Validation System

  • Load runs complete against staging and produce metrics for each measured area.
  • A performance report is generated with average response time, peak latency, failure rate, and resource utilization.
  • Results establish a documented baseline for future comparison.

Technical Requirements

Simulate workloads including:

  • 100 concurrent users.
  • 500 Agreements and 1,000 Agreements datasets.
  • Burst traffic scenarios.

Tooling & constraints:

  • Use a Node-friendly load tool (k6, autocannon, or artillery) under a dedicated test/load/ (or perf/) directory with npm scripts (e.g. test:load).
  • Target a staging instance with a seeded test user/JWT and testnet wallet — never production.
  • Mock or isolate outbound Trustless Work calls so load reflects Thalos, not TW rate limits.
  • Keep these runs out of the default jest CI job (long-running, environment-dependent); trigger manually or in a separate workflow.

Additional Notes

Objective is a performance baseline for future optimization and production-readiness, not a pass/fail gate on every PR.

Testing (required)

  • Load scripts run for each scenario (100 concurrent users, 500 and 1,000 agreements, burst).
  • Metrics captured: avg response time, peak latency, failure rate, CPU/memory.
  • Scripts live under test/load/ (or perf/) with a test:load script and are excluded from the default CI test job.

Proof of Completion (required)

  • Link the merged PR.
  • Attach the generated performance report (baseline numbers per scenario).
  • Paste an excerpt of the load-tool output for at least the 100-concurrent-users run.
  • Confirm (link/diff) the load suite is separated from the Jest CI job.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions