public function get_run($run_id, $type, &$run_desc) {
        global $DB;

        $rec = $DB->get_record('profiling', array('runid' => $run_id), '*', MUST_EXIST);

        $this->runid = $rec->runid;
        $this->url = $rec->url;
        $this->totalexecutiontime = $rec->totalexecutiontime;
        $this->totalcputime = $rec->totalcputime;
        $this->totalcalls = $rec->totalcalls;
        $this->totalmemory = $rec->totalmemory;
        $this->timecreated = $rec->timecreated;

        $run_desc = $this->url . ($rec->runreference ? ' (R) ' : ' ') . ' - ' . s($rec->runcomment);

        // Handle historical runs that aren't compressed.
        if (@gzuncompress(base64_decode($rec->data)) === false) {
            return unserialize(base64_decode($rec->data));
        } else {
            return unserialize(gzuncompress(base64_decode($rec->data)));
        }
    }
public function get_run($run_id, $type, &$run_desc) {
        global $DB;

        $rec = $DB->get_record('profiling', array('runid' => $run_id), '*', MUST_EXIST);

        $this->runid = $rec->runid;
        $this->url = $rec->url;
        $this->totalexecutiontime = $rec->totalexecutiontime;
        $this->totalcputime = $rec->totalcputime;
        $this->totalcalls = $rec->totalcalls;
        $this->totalmemory = $rec->totalmemory;
        $this->timecreated = $rec->timecreated;

        $run_desc = $this->url . ($rec->runreference ? ' (R) ' : ' ') . ' - ' . s($rec->runcomment);

        // Handle historical runs that aren't compressed.
        if (@gzuncompress(base64_decode($rec->data)) === false) {
            return unserialize(base64_decode($rec->data));
        } else {
            return unserialize(gzuncompress(base64_decode($rec->data)));
        }
    }
public function get_run ( $ run_id , $ type , & $ run_desc ) { global $ DB ; $ rec = $ DB -> get_record ( 'profiling' , array ( 'runid' => $ run_id ) , '*' , MUST_EXIST ) ; $ this -> runid = $ rec -> runid ; $ this -> url = $ rec -> url ; $ this -> totalexecutiontime = $ rec -> totalexecutiontime ; $ this -> totalcputime = $ rec -> totalcputime ; $ this -> totalcalls = $ rec -> totalcalls ; $ this -> totalmemory = $ rec -> totalmemory ; $ this -> timecreated = $ rec -> timecreated ; $ run_desc = $ this -> url . ( $ rec -> runreference ? ' (R) ' : ' ' ) . ' - ' . s ( $ rec -> runcomment ) ; // Handle historical runs that aren't compressed. if ( @ gzuncompress ( base64_decode ( $ rec -> data ) ) === false ) { return unserialize ( base64_decode ( $ rec -> data ) ) ; } else { return unserialize ( gzuncompress ( base64_decode ( $ rec -> data ) ) ) ; } }
Given one runid and one type, return the run data
and some extra info in run_desc from DB

Note that $type is completely ignored
Given one runid and one type return the run data and some extra info in run_desc from DB