summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddd819c)
raw | patch | inline | side by side (parent: ddd819c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Jul 2010 14:34:36 +0000 (14:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Jul 2010 14:34:36 +0000 (14:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19299 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/class_management.inc | patch | blob | history | |
gosa-core/include/class_stats.inc | patch | blob | history |
index ba2dafe6db5e376595bf59764de6d1bcf6fcef87..425058b5dfa352f64849ae4cde4e3e5b4e926b76 100644 (file)
}
$this->log("LDAP operation: time=".(microtime(true)-$start)." operation=search('".LDAP::fix($this->basedn)."', '$filter')");
+ stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start));
return($this->sr[$srp]);
}else{
$this->error = "Could not connect to LDAP server";
}
$this->log("LDAP operation: time=".(microtime(true) - $start)." operation=ls('".LDAP::fix($basedn)."', '$filter')");
+ stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start));
return($this->sr[$srp]);
}else{
return (0);
}
if($this->hascon){
+ $start = microtime(TRUE);
if ($this->reconnect) $this->connect();
$r = @ldap_modify($this->cid, LDAP::fix($this->basedn), $attrs);
$this->error = @ldap_error($this->cid);
if(!$this->success()){
$this->error.= $this->makeReadableErrors($this->error,$attrs);
}
+ stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start));
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
function add($attrs)
{
if($this->hascon){
+ $start = microtime(TRUE);
if ($this->reconnect) $this->connect();
$r = @ldap_add($this->cid, LDAP::fix($this->basedn), $attrs);
$this->error = @ldap_error($this->cid);
if(!$this->success()){
$this->error.= $this->makeReadableErrors($this->error,$attrs);
}
+ stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start));
return($r ? $r : 0);
}else{
$this->error = "Could not connect to LDAP server";
index a7d1fec84ddfca166a7cd4a5684e66075b68f41a..0c74ff20f981bb7b44dabd4ef58ddb3f855cb9ab 100644 (file)
$this->headpage = $headpage;
$this->ui = $ui;
$this->config = $config;
+ $this->initTime = microtime(TRUE);
+
+ stats::log('management', $class = get_class($this), $action = __FUNCTION__, $amount = 1,
+ $duration = (microtime(TRUE) - $this->initTime));
if($this->cpHandler) $this->headpage->setCopyPasteHandler($this->cpHandler);
if($this->snapHandler) $this->headpage->setSnapshotHandler($this->snapHandler);
if(isset($this->actions[$action['action']])){
$func = $this->actions[$action['action']];
if(!isset($action['targets']))$action['targets']= array();
+ stats::log('management', $class = get_class($this), $action['action'], $amount = count($action['targets']),
+ $duration = (microtime(TRUE) - $this->initTime));
+
return($this->$func($action['action'],$action['targets'],$action));
}
}
index 4076e202f03fd8c745031955ffae743e35697722..54420e9d91bb08142eb29727c7e69a052d1b6f4a 100644 (file)
$TABLE_NAME = 'stats';
$query = "SELECT * FROM {$TABLE_NAME} ORDER BY MTIMESTAMP";
$query = "SELECT PLUGIN, ACTION, MAX(DURATION) as 'DURATION' FROM {$TABLE_NAME} WHERE ACTION='modify' GROUP BY PLUGIN,ACTION ";
- $query = "SELECT * FROM {$TABLE_NAME} ORDER BY MTIMESTAMP";
+ $query = "SELECT * FROM {$TABLE_NAME} ORDER BY ID DESC LIMIT 20";
$res = sqlite_query($query, $res);
echo "<pre>";
foreach(sqlite_fetch_all($res) as $entry){