PHP Class Webgrind_FileHandler, webgrind

Author: Jacob Oettinger
Author: Joakim Nygård
显示文件 Open project: jokkedk/webgrind Class Usage Examples

Public Methods

Method Description
getInstance ( ) : Singleton
getTraceList ( ) : array Get list of available trace files. Optionally including traces of the webgrind script it self
getTraceReader ( $file, $costFormat ) : Webgrind_Reader Get a trace reader for the specific file.

Private Methods

Method Description
__construct ( )
bytestostring ( integer $size, integer $precision ) : string Present a size (in bytes) as a human-readable value
getFiles ( $format, $dir ) : array List of files in $dir whose filename has the format $format
getInvokeUrl ( $file ) : void Get the value of the cmd header in $file
getPrepFiles ( $format, $dir ) : array List of files in $dir whose filename has the format $format
mtimeCmp ( $a, $b ) : boolean Comparison function for sorting

Method Details

getInstance() public static method

public static getInstance ( ) : Singleton
return Singleton instance of the filehandler

getTraceList() public method

Get list of available trace files. Optionally including traces of the webgrind script it self
public getTraceList ( ) : array
return array Files

getTraceReader() public method

If the file has not been preprocessed yet this will be done first.
public getTraceReader ( $file, $costFormat ) : Webgrind_Reader
return Webgrind_Reader Reader for $file