edulazaro/larameter
Larameter is a lightweight Laravel package for capturing application measurements with minimal setup. It provides simple helpers to record counters, gauges, and timings, making it easy to add basic metering and monitor behavior in your Laravel projects.
Larameter is a measurement/instrumentation package for Laravel: you drop it in, wrap the code path you care about (a route, a console command, a queued job), and get numbers back instead of guessing. 1.2.0 is a small, non-breaking release — the changelog entry "Contemplate cache usage" signals that caching of measurements/results has been considered, so read the diff before assuming your existing numbers still come from a live measurement.
Minimal steps:
composer require edulazaro/larameter (pin ^1.2 once you've verified the diff from 1.1.1).php artisan vendor:publish --provider="EduLazaro\Larameter\...") and read it top to bottom — this is where enable/disable, storage and any caching behaviour is toggled.README.md for the public entry point (facade, helper, or middleware) and the changelog link 1.1.1...1.2.0 for the caching change specifically. The release note is one line; the diff is the real documentation here.Do the first run in local or a dedicated staging environment, not in production.
Middleware for HTTP timings. If the package ships middleware, register it on the routes you actually care about rather than globally:
Route::middleware(['web', 'larameter'])->group(function () {
Route::get('/reports', ReportController::class);
});
Baseline-then-change workflow. The highest-value pattern day to day is not continuous monitoring — it's A/B measurement around a single change. Record the number, make the change (add an index, eager-load a relation, swap a cache driver), record again, keep the diff in the PR description.
Wrap console commands and jobs. Web requests are the obvious case, but the expensive paths in Laravel apps are usually queue workers and scheduled commands. Measure there with the same API, and use Bus::fake() / Queue::fake() in tests so you aren't measuring test overhead.
Assert on measurements in tests. Convert a measurement into a guardrail so a regression fails CI rather than being noticed in a month:
$this->artisan('reports:build');
$this->assertLessThan(500, /* measurement value */);
Keep thresholds generous — CI machines are noisy.
Gate by environment in config. The package should be a no-op outside local/staging. Wire this from APP_ENV in the config rather than remembering to comment out middleware before a deploy.
Caching (new in 1.2.0). The intended pattern is almost certainly to cache measurement results so you don't recompute an expensive measurement per request — or, conversely, to have the package's own cache interactions accounted for so a warm cache doesn't flatter your numbers. Either way, treat cached measurements like any other cache: give them an explicit TTL, namespace the key by route/command and by tenant if you're multi-tenant, and clear them on deploy so a config or code change isn't masked by a stale entry from the previous release.
config:cache freezes your config. If you publish the config and later change the enable flag, run php artisan config:clear — otherwise you'll debug a package that "isn't working" when it's just reading a cached flag.php artisan serve. Use the same runtime you deploy (Octane/FPM), or your baseline is measuring the dev server.^1.2 and read the diff on each bump. Do not assume 1.2.x patches are behaviour-neutral until the changelog gets more descriptive.How can I help you explore Laravel packages today?