New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

laramint/laravel-stress

Fire-and-forget HTTP stress testing runner for Laravel development environments
416,996 8
Install
composer require laramint/laravel-stress
Latest Version:v1.0.3
PHP:>=8.1
Laravel:9 – 13
License:MIT
Last Updated:Sep 18, 2026
Links: GitHub  ·  Packagist
Maintainer: mrmarchone

laravel-stress

Fire-and-forget HTTP stress testing engine for Laravel development.

Spawns Guzzle request pools in a background subprocess so they never deadlock against PHP's single-threaded built-in server (php artisan serve). Works transparently with multi-threaded servers (Nginx, Apache, Herd, Valet) via an in-process fallback.

Installation

composer require laramint/laravel-stress

Usage

use LaraMint\LaravelStress\StressTestRunner;

$runner = new StressTestRunner;

// Background (non-blocking) — returns a job ID to poll
$jobId = $runner->startBackground([
    'method'      => 'GET',
    'url'         => 'http://127.0.0.1:8000/api/users',
    'count'       => 50,
    'concurrency' => 5,
    'timeout'     => 10,
    'headers'     => ['Authorization' => 'Bearer token'],
    'body'        => null,
]);

// Poll the result file written by the subprocess
$resultFile = sys_get_temp_dir() . '/lb_st_res_' . $jobId . '.json';
// { "status": "running" }  →  keep polling
// { "status": "done", "result": { ... } }  →  done

// Synchronous (blocking) — works with multi-threaded servers
$result = $runner->run([...]);

Result shape

{
  "total": 50,
  "succeeded": 48,
  "failed": 2,
  "successRate": 96.0,
  "errorRate": 4.0,
  "throughput": 12.5,
  "timing": { "min": 42.1, "avg": 95.3, "p50": 88.0, "p95": 210.4, "p99": 380.1, "max": 420.7 },
  "statusDistribution": { "200": 48, "500": 2 },
  "errors": [],
  "wallTimeMs": 4000
}

License

MIT

Related Packages

intervention/httpauth

HTTP Authentication Management for PHP

14,457,104 83
spondonit/zttp

A developer-experience focused HTTP client, optimized for most common use cases.

6,283 0
ckryo/laravel_http

响应格式封装、跨域处理

59 0
kozz/laravel-guzzle-provider

Guzzle 5/6 Service Provider for Laravel

1,110,076 62
postman/flaps

Modular library for rate limiting requests in applications

741,172 0

Version History

Version Released PHP Laravel License
v1.0.3 >=8.1 ^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.0.2 >=8.1 ^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.0.1 >=8.1 ^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.0.0 >=8.1 ^9.0|^10.0|^11.0|^12.0 MIT