AMemoryUsageDriver.php
Current file: C:\DATA\Viktor\Diplomka\XSLT-Benchmarking/XSLTBenchmarking/TestsRunner/Processors/MemoryUsage/AMemoryUsageDriver.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
0.00% 0 / 1
0.00% 0 / 1 CRAP
0.00% 0 / 2
AMemoryUsageDriver
0.00% 0 / 1
66.67% 2 / 3 12
0.00% 0 / 2
 __construct($tmpDir)
0.00% 0 / 1 2
0.00% 0 / 2
 run($command)
100.00% 1 / 1 1
100.00% 0 / 0
 get()
100.00% 1 / 1 1
100.00% 0 / 0



       1                 : <?php                                                                                            
       2                 :                                                                                                  
       3                 : /**                                                                                              
       4                 :  * XSLT Benchmarking                                                                             
       5                 :  * @link https://github.com/masicek/XSLT-Benchmarking                                            
       6                 :  * @author Viktor Mašíček <viktor@masicek.net>                                                
       7                 :  * @license "New" BSD License                                                                    
       8                 :  */                                                                                              
       9                 :                                                                                                  
      10                 : namespace XSLTBenchmarking\TestsRunner;                                                          
      11                 :                                                                                                  
      12                 : require_once LIBS . '/PhpPath/PhpPath.min.php';                                                  
      13                 :                                                                                                  
      14                 : use PhpPath\P;                                                                                   
      15                 :                                                                                                  
      16                 :                                                                                                  
      17                 : /**                                                                                              
      18                 :  * Different OS interface for class for geting maximum memory usage of command excuteb by 'exec'.
      19                 :  *                                                                                               
      20                 :  * @author Viktor Mašíček <viktor@masicek.net>                                                
      21                 :  */                                                                                              
      22                 : abstract class AMemoryUsageDriver                                                                
      23                 : {                                                                                                
      24                 :                                                                                                  
      25                 :                                                                                                  
      26                 :     /**                                                                                          
      27                 :      * Path of temporary directory                                                               
      28                 :      *                                                                                           
      29                 :      * @var string                                                                               
      30                 :      */                                                                                          
      31                 :     protected $tmpDir;                                                                           
      32                 :                                                                                                  
      33                 :                                                                                                  
      34                 :     /**                                                                                          
      35                 :      * Set temporary directory for possible using in drivers                                     
      36                 :      *                                                                                           
      37                 :      * @param string $tmpDir Path of temporary directory                                         
      38                 :      */                                                                                          
      39                 :     public function __construct($tmpDir)                                                         
      40                 :     {                                                                                            
      41               0 :         $this->tmpDir = P::mcd($tmpDir);                                                         
      42               0 :     }                                                                                            
      43                 :                                                                                                  
      44                 :                                                                                                  
      45                 :     /**                                                                                          
      46                 :      * Prepare checking memory usage of set command.                                             
      47                 :      * Drivers can return modified commad for better checking.                                   
      48                 :      *                                                                                           
      49                 :      * @param string $command Checked command                                                    
      50                 :      *                                                                                           
      51                 :      * @return string                                                                            
      52                 :      */                                                                                          
      53                 :     abstract public function run($command);                                                      
      54                 :                                                                                                  
      55                 :                                                                                                  
      56                 :     /**                                                                                          
      57                 :      * Return maximum memory usage (in bytes) last checked command by self::run().               
      58                 :      *                                                                                           
      59                 :      * @return integer                                                                           
      60                 :      */                                                                                          
      61                 :     abstract public function get();                                                              
      62                 :                                                                                                  
      63                 :                                                                                                  
      64                 : }                                                                                                


Generated by PHP_CodeCoverage @package_version@ using PHP 5.3.6 and PHPUnit @package_version@ at Tue Jun 26 15:06:55 CEST 2012.