agentleFS
agentsdanceagentsdance/agentskills/skills/load-tester/SKILL.md

load-tester

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Perform load and performance testing. Use when the user needs to stress test APIs, measure response times, or identify performance bottlenecks.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Load Tester

Perform load testing and performance benchmarking.

k6 Load Testing

// load-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  stages: [
    { duration: '30s', target: 20 },   // Ramp up to 20 users
    { duration: '1m', target: 20 },    // Stay at 20 users
    { duration: '30s', target: 50 },   // Ramp up to 50 users
    { duration: '1m', target: 50 },    // Stay at 50 users
    { duration: '30s', target: 0 },    // Ramp down
  ],
  thresholds: {
    http_req_duration: ['p(95)<500'],  // 95% of requests under 500ms
    http_req_failed: ['rate<0.01'],    // Less than 1% errors
  },
};

export default function () {
  const res = http.get('https://api.example.com/users');

  check(res, {
    'status is 200': (r) => r.status === 200,
    'response time < 500ms': (r) => r.timings.duration < 500,
  });

  sleep(1);
}
# Run test
k6 run load-test.js

# Run with more VUs
k6 run --vus 100 --duration 5m load-test.js

# Output to JSON
k6 run --out json=results.json load-test.js

Artillery

# artillery.yml
config:
  target: "https://api.example.com"
  phases:
    - duration: 60
      arrivalRate: 10
      name: "Warm up"
    - duration: 120
      arrivalRate: 50
      name: "Sustained load"
    - duration: 60
      arrivalRate: 100
      name: "Peak load"
  defaults:
    headers:
      Authorization: "Bearer {{ $processEnvironment.API_TOKEN }}"

scenarios:
  - name: "Browse and purchase"
    weight: 70
    flow:
      - get:
          url: "/api/products"
      - think: 2
      - get:
          url: "/api/products/{{ $randomNumber(1, 100) }}"
      - think: 1
      - post:
          url: "/api/cart"
          json:
            productId: "{{ $randomNumber(1, 100) }}"
            quantity: 1

  - name: "User profile"
    weight: 30
    flow:
      - get:
          url: "/api/users/me"
# Run test
artillery run artillery.yml

# Generate report
artillery run --output report.json artillery.yml
artillery report report.json

Apache Benchmark (ab)

# Simple test: 1000 requests, 10 concurrent
ab -n 1000 -c 10 https://api.example.com/health

# POST request with data
ab -n 100 -c 5 -p data.json -T application/json https://api.example.com/users

Metrics to Track

MetricDescriptionGood Value
Response time (p50)Median response< 200ms
Response time (p95)95th percentile< 500ms
Response time (p99)99th percentile< 1s
Error rateFailed requests< 1%
ThroughputRequests/secondDepends on infra

Result Analysis

✓ status is 200
✓ response time < 500ms

http_req_duration.............: avg=120ms  min=45ms  med=98ms  max=890ms  p(95)=320ms
http_req_failed...............: 0.12%
http_reqs.....................: 15000  250/s

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.