class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
+ var $mProfileID = false;
function ProfilerSimple() {
global $wgRequestTime,$wgRUstart;
$this->mMinimumTime = $min;
}
+ function setProfileID( $id ) {
+ $this->mProfileID = $id;
+ }
+
+ function getProfileID() {
+ if ( $this->mProfileID === false ) {
+ return wfWikiID();
+ } else {
+ return $this->mProfileID;
+ }
+ }
+
function profileIn($functionname) {
global $wgDebugFunctionEntry;
if ($wgDebugFunctionEntry) {
$plength=0;
$packet="";
foreach ($this->mCollated as $entry=>$pfdata) {
- $pfline=sprintf ("%s %s %d %f %f %f %f %s\n", wfWikiID(),"-",$pfdata['count'],
+ $pfline=sprintf ("%s %s %d %f %f %f %f %s\n", $this->getProfileID(),"-",$pfdata['count'],
$pfdata['cpu'],$pfdata['cpu_sq'],$pfdata['real'],$pfdata['real_sq'],$entry);
$length=strlen($pfline);
/* printf("<!-- $pfline -->"); */