Beispiel #1
0
 /**
  * Display Some statistics about Finished Jobs.
  * @return null
  */
 public function stats()
 {
     $this->out('Jobs currenty in the Queue:');
     $types = $this->QueuedTask->getTypes();
     foreach ($types as $type) {
         $this->out("\t  " . str_pad($type, 20, ' ', STR_PAD_RIGHT) . ": " . $this->QueuedTask->getLength($type));
     }
     $this->hr();
     $this->out('Total unfinished Jobs	   : ' . $this->QueuedTask->getLength());
     $this->hr();
     $this->out('Finished Job Statistics:');
     $data = $this->QueuedTask->getStats();
     debug($data);
     foreach ($data as $item) {
         if (!array_key_exists('runtime', $item[0])) {
             $t_item = array_values($item[0]);
             $item[0]['jobtype'] = $t_item[0];
             $item[0]['num'] = $t_item[1];
             $item[0]['alltime'] = $t_item[2];
             $item[0]['fetchdelay'] = $t_item[3];
             $item[0]['runtime'] = $t_item[4];
         }
         $this->out(" " . $item[0]['jobtype'] . ": ");
         $this->out("   Finished Jobs in Database: " . $item[0]['num']);
         $this->out("   Average Job existence\t: " . $item[0]['alltime'] . 's');
         $this->out("   Average Execution delay\t: " . $item[0]['fetchdelay'] . 's');
         $this->out("   Average Execution time\t: " . $item[0]['runtime'] . 's');
     }
 }
Beispiel #2
0
 /**
  * Display Some statistics about Finished Jobs.
  * @return null
  */
 public function stats()
 {
     $this->out('Jobs currenty in the Queue:');
     $types = $this->QueuedTask->getTypes();
     foreach ($types as $type) {
         $this->out("      " . str_pad($type, 20, ' ', STR_PAD_RIGHT) . ": " . $this->QueuedTask->getLength($type));
     }
     $this->hr();
     $this->out('Total unfinished Jobs      : ' . $this->QueuedTask->getLength());
     $this->hr();
     $this->out('Finished Job Statistics:');
     $data = $this->QueuedTask->getStats();
     foreach ($data as $item) {
         $this->out(" " . $item['QueuedTask']['jobtype'] . ": ");
         $this->out("   Finished Jobs in Database: " . $item[0]['num']);
         $this->out("   Average Job existence    : " . $item[0]['alltime'] . 's');
         $this->out("   Average Execution delay  : " . $item[0]['fetchdelay'] . 's');
         $this->out("   Average Execution time   : " . $item[0]['runtime'] . 's');
     }
 }