Code

Ensure we either call the plugins constructor or manually set the initTime variable...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Aug 2010 10:08:12 +0000 (10:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Aug 2010 10:08:12 +0000 (10:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19328 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc

index 8697308f69fc8d3c4e07e68a41060f7d2f8adb7c..d6cbccf6a6705240acd8145f0d934f6b119ff510 100644 (file)
@@ -36,6 +36,7 @@ class dhcpPlugin extends plugin
 
     function dhcpPlugin(&$parent,$attrs)
     {
+        $this->initTime = microtime(TRUE);
         $this->parent = $parent;
 
         $this->options = new dhcpOption();
@@ -79,6 +80,11 @@ class dhcpPlugin extends plugin
 
         /* Save CN for later reference */
         $this->orig_cn= $this->cn;
+
+        // Create statistic table entry
+        stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
+                $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
+
     }
 
     function execute()