Ignore:
Timestamp:
04/24/13 15:50:30 (8 years ago)
Author:
ramonb
Message:

libtoga.php:

  • calculate parsetime

templates/footer.tpl:

  • made parsetime optional

index.php:

  • don't show parsetime for archive: not applicable

overview.php:

  • assign parsetime
  • closes #161
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/web/addons/job_monarch/libtoga.php

    r820 r836  
    564564    function DataGatherer( $cluster )
    565565    {
    566         $this->cluster    = $cluster;
    567         $this->httpvars = $httpvars;
     566        $this->cluster   = $cluster;
     567        $this->httpvars  = $httpvars;
     568        $this->parsetime = 0;
    568569    }
    569570
     
    574575        $this->xmlhandler     = new TorqueXMLHandler( $this->cluster );
    575576
     577        $start = gettimeofday();
     578
    576579        xml_parser_set_option( $this->parser, XML_OPTION_CASE_FOLDING, 0 );
    577580        xml_set_element_handler( $this->parser, array( &$this->xmlhandler, 'startElement' ), array( &$this->xmlhandler, 'stopElement' ) );
     
    583586        $handler = &$this->xmlhandler;
    584587        $handler->finishUp();
     588
     589        $end = gettimeofday();
     590
     591        $this->parsetime = ($end['sec'] + $end['usec']/1e6) - ($start['sec'] + $start['usec']/1e6);
    585592    }
    586593
Note: See TracChangeset for help on using the changeset viewer.