Drop your thoughts below — let’s discuss how Glockit can help streamline your workflow!
🚀 Introducing Glockit: Benchmark REST APIs with Ease
If you’ve ever struggled with benchmarking REST APIs, juggling request chaining, or managing concurrency, you’ll love Glockit — a lightweight TypeScript CLI and library designed to make API performance testing simple, powerful, and developer-friendly.
🔑 Why Glockit?
- Request Chaining: Extract variables from one response and reuse them in subsequent requests.
- Concurrent Execution: Run multiple requests in parallel with configurable concurrency.
- Zero Dependencies: Built with minimal external dependencies for reliability.
- Real-time Progress Tracking: Clean console-based progress bars.
- Flexible Execution Modes: Benchmark by request count or duration.
- Multi-format Output: Export results in JSON and CSV for deeper analysis.
⚡ Quick Start
Install globally for CLI usage:
npm install -g glockit
Create a simple benchmark.json:
{
"name": "E-Commerce API Benchmark",
"global": {
"baseUrl": "https://api.example.com/v1",
"maxRequests": 100,
"concurrent": 10
},
"endpoints": [
{
"name": "User Login",
"url": "/auth/login",
"method": "POST",
"body": { "email": "test@example.com", "password": "test123" },
"variables": [{ "name": "authToken", "path": "token", "from": "response" }]
},
{
"name": "Get Products",
"url": "/products",
"method": "GET",
"headers": { "Authorization": "Bearer {{authToken}}" },
"dependencies": ["User Login"]
}
]
}
Run the benchmark:
npx glockit run --config benchmark.json --save
📊 Example Output
- ✅ Total Requests: 100
- ⏱️ Total Time: 1.25s
- 📈 Requests per Second: 80
- ✅ Success Rate: 98%
Results are saved in JSON and CSV for easy analysis.
🛠️ Use Cases
- Load testing your API workflows
- Validating authentication + chained requests
- Comparing performance across environments
- Generating reproducible benchmark reports
🌟 Get Involved
Glockit is open-source under MIT license. Contributions, feedback, and stars are welcome!
👉 Check out the repo
Top comments (1)
“Thanks for checking out Glockit! 🎉 I am curious to hear from the community:
Do you currently benchmark APIs in your workflow?
What tools or approaches have you tried before?
Where do you see the biggest pain points?”