Download the PHP package phpfui/mysql-slow-log-parser without Composer

On this page you can find all versions of the php package phpfui/mysql-slow-log-parser. 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 mysql-slow-log-parser

PHPFUI\MySQLSlowLog\Parser Tests Latest Packagist release

PHP Parser for MySQL and MariaDB Slow Query Logs featuring sortable results

Requirements

Usage

$parser = new \PHPFUI\MySQLSlowQuery\Parser($logFilePath);

// Return the sessions in the file as array
$sessions = $parser->getSessions();

// Return all entries in file as array, or pass session number (0 based)
$entries = $parser->getEntries();

if (count($entries))
  {
  // Get the worst offender
  $entry = $parser->sortEntries()->getEntries()[0];
  echo 'Query ' . implode(' ', $entry->Query) . " took {$entry->Query_time} seconds at {$entry->Time}\n";

  // Get the most rows examined
  $entry = $parser->sortEntries('Rows_examined', 'desc')->getEntries()[0];
  echo 'Query ' . implode(' ', $entry->Query) . " looked at {$entry->Rows_examined} rows\n";
  }

Entries

\PHPFUI\MySQLSlowQuery\Entry provides details on each query. Supported fields:

MariaDB adds the following fields:

Sessions

\PHPFUI\MySQLSlowQuery\Session contains MySQL server information and are created on server restarts and log flushes. Pass the zero based session number to getEntries for only that Session's entries. Supported fields:

Sort Entries

By default, entries are returned in log order, but call sortEntries on the Parser to sort by any valid field (parameter 1). Sort defaults to 'desc', anything else will sort ascending.

Full Class Documentation

PHPFUI/InstaDoc

License

Distributed under the MIT License.


All versions of mysql-slow-log-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0 <8.5
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 phpfui/mysql-slow-log-parser contains the following files

Loading the files please wait ....