Download the PHP package tox82/server-timing-helper without Composer

On this page you can find all versions of the php package tox82/server-timing-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package server-timing-helper

Server Timing Helper

A Simple Tool for Benchmarking Your PHP Code

The ServerTiming class is designed to assist developers in measuring and logging the execution time of various code segments within a PHP application. By utilizing this class, you can initiate and terminate timers for different metrics, transmit these metrics to the client via the Server-Timing header, and record the results to a file. This is particularly useful for performance monitoring and optimization.

server-timing

This tool is based on the Server Timing specification. You can learn more about it on web.dev.

Installation:


Usage


The profile Method

This is the easiest way to use the ServerTiming class. It automatically handles the start/stop methods, and logs the results to the Network/Timing panel in your browser's DevTools.

The start/stop Method

Alternatively, you can manually control the start and stop methods by using start/stop instead of profile:

Saving the Output to a Log File

The log method enables you to write detailed log entries for your metrics to a file. This requires you to have a valid, writeable log file, but IMO it makes it a little bit easier to read the metrics. You can use nested blocks to log the execution time of specific parts of your code. My suggestion is to add some spaces to the beginning of the nested blocks to make it more readable.

server_timing

Setting a Custom Log File

By default, Server Timing Helper attempts to find the apache error_log file path for logging. However, you can specify a custom log file path using the setLogFile method. Make sure to set the log file path before using the log method.

Resources



All versions of server-timing-helper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tox82/server-timing-helper contains the following files

Loading the files please wait ....