Copied!
CloneableInstantiable
Methods
public __construct(string $fileName)
 

Parse a MySQL Slow Query Log file

public getEntries(int $session = -1) : array
 

Return \PHPFUI\MySQLSlowQuery\Entry entries from file

  • param int $session return entries from the specified session
  • throws \Exception\EmptyLog
  • throws \Exception\LogLine
  • return array<int,\PHPFUI\MySQLSlowQuery\Entry>
public getSessions() : array
 
  • throws \Exception\EmptyLog
  • throws \Exception\LogLine
  • return array<int,\PHPFUI\MySQLSlowQuery\Session> sessions from file
public sortEntries(string $sortColumn = 'Query_time', string $sortOrder = 'desc') : self
 

Sort \PHPFUI\MySQLSlowQuery\Entry entries. Defaults to Query_time, desc

  • throws \Exception\EmptyLog
  • throws \Exception\LogLine
Methods
protected entrySort(PHPFUI\MySQLSlowQuery\Entry $lhs, PHPFUI\MySQLSlowQuery\Entry $rhs) : int
Constants
private PHPFUI\MySQLSlowQuery\Parser::PORT = 'TCP Port: '
private PHPFUI\MySQLSlowQuery\Parser::TIME = '# Time: '
Properties
private array $entries = []
 
  • var array<int,\PHPFUI\MySQLSlowQuery\Entry>
private array $extraLines = []
 
  • var array<int,string>
private string $fileName = ''
private $handle = NULL
private bool $inSession = true
private array $sessions = []
 
  • var array<int,\PHPFUI\MySQLSlowQuery\Session>
private string $sortColumn = 'Query_time'
private string $sortOrder = 'desc'
Methods
private getNextLine() : string
private parse() : void
private pushLine(string $line) : self
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration