My Blog Posts

Laravel Server Timing Pack

Laravel Server Timing Pack

Laravel Server Timing is a package offered by Marcel Pociot, which allows you to easily add server schedule information to your applications.

Server scheduling information helps you retrieve device request/response data from the server for data at a glance that you want to appear in the browser.

After you set up the Server Schedule package, the following metrics are ready to use:

  • Bootstrap
  • Application time
  • Total

Here's an example of server scheduling information, as shown in Google Chrome using default tool values:

ServerTiming you can add additional metrics to this package with :

ServerTiming::start('Running expensive task');// do somethingServerTiming::stop('Running expensive task');// If you already know the exact time:
ServerTiming::setDuration('Running expensive task', 1200);
// Measure the duration of the closure:
ServerTiming::setDuration('Running expensive task', function() {

Finally, an example that uses default metrics:

Server-Timing: bootstrap;desc="Bootstrap";dur=32.552003860474, app;desc="App";dur=8, total;desc="Total";dur=41.576147079468,

You can learn more about this package, take all setup instructions, and view the source code on GitHub at beyondcode / laravel-server-timing.

Share this article

Comments (0)