Esempio n. 1
0
 function message($msg)
 {
     $performanceMode = false;
     if ($performanceMode) {
         echo '<h3 class="debug">:&nbsp;' . $msg . ': ' . time::stoptiming() . '</h3>';
     }
 }
Esempio n. 2
0
<br></td>
<td width="1" class="outliner"><img src="images/spacer.gif" border="0" width="1" height="1"></td>
</tr> </table> 
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr> 
    <td class="outliner"><img src="images/spacer.gif" border="0" width="1" height="1"></td>
  </tr>
</table></td>
</tr> </table> 
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
  <tr> 
    <td width="1" class="outliner"><img src="images/spacer.gif" border="0" width="1" height="1"></td>
    <td class="footerAndHeadercolour">&nbsp;</td>
    <td class="footerAndHeadercolour" align="right">
      Processing time:<?php 
echo time::stoptiming();
?>
&nbsp;
    </td>
      <td width="1" class="outliner"><img src="images/spacer.gif" border="0" width="1" height="1"></td>
  </tr>
   <tr> 
    <td colspan="4" class="outliner"><img src="images/spacer.gif" border="0" width="1" height="1"></td>
    </tr>
</table>
</body>
</html>

<?php 
if ($db != '') {
    debug::message("disconnecting from database");
Esempio n. 3
0
        //Preformance overhead lies here!
        $planGraphList = GraphConversion::convertStringPrologPlansToGraphs($plans);
        $workFlowvalues = array();
        $workFlowvalues['timestamp'] = $modified = time::ts_unix_mysql(time::timestamp());
        //Create a new workflow item
        $keyinserted = dbs::irrecord('workflow', $workFlowvalues, false);
        //Link all plans to this workflow item
        $newstoptime = time::stoptiming() - $stoptime;
        $stoptime = time::stoptiming();
        performance::message("Stop Prolog Planner parsing");
        if ($model['workflowCaching']) {
            saveCachePlans($planGraphList, $keyinserted, $modelId);
        } else {
            savePlans($planGraphList, $keyinserted, true);
        }
        $newstoptime = time::stoptiming() - $stoptime;
        performance::message("Database updating");
        echo '<br><Br>';
        systemMessages::message("Plan generation complete!");
        systemMessages::message("Number of plans:" . sizeof($planGraphList));
    }
} else {
    $workFlowvalues = array();
    $workFlowvalues['timestamp'] = $modified = time::ts_unix_mysql(time::timestamp());
    //Create a new workflow item
    $keyinserted = dbs::irrecord('workflow', $workFlowvalues, false);
    $planGraphList = dbs::selrecord('plan', 'workflowcachingstore', "modelId={$modelId}", 0, 3);
    savePlans($planGraphList, $keyinserted, false);
    echo '<br><Br>';
    systemMessages::message("Plan generation using caching feature complete!");
    systemMessages::message("Number of plans:" . sizeof($planGraphList));
Esempio n. 4
0
 function testTiming()
 {
     time::starttiming();
     $this->assertNotNull(time::stoptiming());
     $this->assertWantedPattern('/[0123456789]*/', time::stoptiming());
 }