LuaadvanceddevopsAI generated

Custom Load-Testing Tool built on wrk Lua Scripting

Build a reusable HTTP load-testing toolkit using wrk's embedded Lua scripting to generate realistic multi-endpoint traffic patterns, dynamic auth tokens, and custom metrics aggregation. Learners practice writing Lua request/response hooks for a high-performance C benchmarking tool and analyzing latency distributions.

Estimate
~9.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

wrk · Lua

Project roadmap

  1. 01

    Set up wrk and baseline script

    ~1h

    Install wrk and write a minimal Lua script overriding the request() function.

  2. 02

    Model multi-endpoint traffic

    ~2h

    Write logic to randomly select from a weighted list of endpoints and HTTP methods per request.

  3. 03

    Handle dynamic authentication

    ~2h

    Fetch and refresh an auth token during setup() and attach it to each request's headers.

  4. 04

    Aggregate custom metrics

    ~2.5h

    Use the response() callback to record per-endpoint latency and status codes into Lua tables.

  5. 05

    Generate a summary report

    ~2h

    Use the done() callback to compute and print percentile latencies and error rates per endpoint.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~9.5h · 5 steps

Tech stack

wrkLua