perf-lint
Static analysis for JMeter, k6, and Gatling scripts — 53 rules, auto-fix, quality scoring, and CI/CD integration.
What's Included
Overview
Catch performance test quality issues before they reach production. perf-lint statically analyses your JMeter .jmx, k6 .js/.ts, and Gatling .scala/.kt scripts and reports violations: missing think times, hardcoded values, absent assertions, unrealistic ramp patterns, and more.
Install it in seconds, run it locally or in CI, and get an instant quality score.
pip install perf-lint-tool
perf-lint check tests/
Every file gets a quality score (0–100, grade A–F) based on its violations. The free CLI shows 18 essential rules. Connect to your dashboard to unlock all 53.
Quick Start
# Install
pip install perf-lint-tool
# Analyse a file or directory
perf-lint check test.jmx
perf-lint check tests/ --severity warning
# Auto-fix safe violations in place
perf-lint check test.jmx --fix
# Preview fixes without applying them
perf-lint check test.jmx --fix-dry-run
# Output JSON or SARIF for CI tooling
perf-lint check tests/ --format json
perf-lint check tests/ --format sarif --output results.sarif
What It Detects
53 rules spanning three frameworks — every rule has a clear message, a suggestion, and a fix example.
| Framework | Rules | Auto-fixable |
|---|---|---|
| Apache JMeter | 25 | 15 |
| k6 | 15 | 7 |
| Gatling | 13 | 3 |
| Total | 53 | 25 |
Example violations detected:
- Missing HTTP Cache Manager / Cookie Manager
- Zero or unrealistic think time (BeanShell timers, constant-only timers)
- Hardcoded hostnames, ports, and auth tokens
- Missing assertions and response checks
- Ramp-up periods too short for the target load
- Missing correlation / dynamic variable extraction
- No thresholds or graceful stop in k6
- At-once user injection in Gatling
Tier Breakdown
perf-lint runs all 53 rules locally — your scripts never leave your machine. The free CLI shows the 18 most actionable hygiene rules. Connect an API key to see the full picture in your dashboard.
| Feature | Free | Pro | Team |
|---|---|---|---|
CLI tool (pip install perf-lint-tool) |
✓ | ✓ | ✓ |
| 18 free hygiene rules (local output) | ✓ | ✓ | ✓ |
| Auto-fix (25 rules) | ✓ | ✓ | ✓ |
| Quality score & A–F grade | ✓ | ✓ | ✓ |
| JSON & SARIF output | ✓ | ✓ | ✓ |
| GitHub Action | ✓ | ✓ | ✓ |
| 22 Pro rules (production-critical ERRORs) | — | ✓ | ✓ |
| Dashboard — full violation history | — | ✓ | ✓ |
| 13 Team rules (advanced architecture patterns) | — | — | ✓ |
| Team dashboard — cross-project reporting | — | — | ✓ |
| Price |
Free
Open source · MIT
|
Dashboard
Sign up at perflint.martkos-it.co.uk
|
Dashboard
Sign up at perflint.martkos-it.co.uk
|
| Install Free CLI | Go to Dashboard | Go to Dashboard |
GitHub Action
Add perf-lint to any workflow in under a minute:
- uses: markslilley/perf-lint-action@v1
with:
paths: tests/
severity: warning
upload_sarif: 'true' # Surface violations in GitHub Code Scanning
api_key: ${{ secrets.PERF_LINT_API_KEY }}
Outputs: violations, score, grade — use them in subsequent steps or in PR status checks.
Available on the GitHub Marketplace.
CI/CD Integration
GitHub Actions
name: perf-lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
security-events: write # Required for SARIF upload
steps:
- uses: actions/checkout@v4
- uses: markslilley/perf-lint-action@v1
with:
paths: tests/
upload_sarif: 'true'
api_key: ${{ secrets.PERF_LINT_API_KEY }}
Any CI (pip + CLI)
pip install perf-lint-tool
perf-lint check tests/ --severity warning --format json --output results.json
Configuration
Create a .perf-lint.yml at the root of your repository to customise behaviour:
# .perf-lint.yml
severity: warning # Minimum severity to report
rules:
JMX003:
severity: error # Escalate a rule
JMX013:
enabled: false # Silence a rule
ignore_paths:
- "tests/fixtures/**"
- "**/*.bak.jmx"
Generate a starter config:
perf-lint init
How the Score Works
Each file is scored 0–100 based on its violations:
score = max(0, 100 − (errors × 15) − (warnings × 5) − (infos × 1))
| Score | Grade |
|---|---|
| 90–100 | A |
| 75–89 | B |
| 60–74 | C |
| 40–59 | D |
| 0–39 | F |
The overall score is the unweighted average across all analysed files.
Why perf-lint?
| Problem | Without perf-lint | With perf-lint |
|---|---|---|
| Missing think time | Discovered during test run (too late) | Caught at commit time |
| Hardcoded hostnames | Breaks in CI, prod environments silently | ERROR flagged immediately |
| No assertions | Tests pass even when application fails | Detected before merge |
| BeanShell timers | Performance bottleneck in production run | Highlighted with fix suggestion |
| Unrealistic ramp-up | Results invalidated — wasted test run | Caught before execution |
Open Source
perf-lint is open source under the MIT licence.
- GitHub: markslilley/perf-lint
- PyPI: perf-lint-tool
- GitHub Action: markslilley/perf-lint-action
- Dashboard: perflint.martkos-it.co.uk
Contributions, bug reports, and rule requests welcome.