From: hickert Date: Fri, 20 Aug 2010 15:11:28 +0000 (+0000) Subject: Updated statistics X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eeea4a3d954595e65bebb30e021739e960e979c4;p=gosa.git Updated statistics git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19423 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc index a86f5491f..b615da14d 100644 --- a/gosa-core/plugins/generic/statistics/class_statistics.inc +++ b/gosa-core/plugins/generic/statistics/class_statistics.inc @@ -306,7 +306,34 @@ class statistics extends plugin $this->generateCategoryPieGraph($gData['actionsPerCategory']); } $this->generateActionsGraph($gData); - $this->generateSystemStatsGraph($gData); + + // Generate graph which displays the memory usage over time + $series = array( + 'max_mem' => _('Max'), + 'avg_mem' => _('Avergae'), + 'min_mem' => _('Min')); + $this->generateSystemStatsGraph($gData,'usagePerInterval',$series, _("Memory usage"),3); + + // Generate graph which displays the cpu load over time + $series = array( + 'max_load' => _('Max'), + 'avg_load' => _('Avergae'), + 'min_load' => _('Min')); + $this->generateSystemStatsGraph($gData,'usagePerInterval',$series, _("CPU load"),4); + + // Generate graph which displays the render time + $series = array( + 'max_render' => _('Max'), + 'avg_render' => _('Avergae'), + 'min_render' => _('Min')); + $this->generateSystemStatsGraph($gData,'usagePerInterval',$series, _("Render time"),5); + + // Generate graph which displays the plugin duration + $series = array( + 'max_dur' => _('Max'), + 'avg_dur' => _('Avergae'), + 'min_dur' => _('Min')); + $this->generateSystemStatsGraph($gData,'usagePerInterval',$series, _("Seconds per action"),6); } @@ -376,15 +403,6 @@ class statistics extends plugin */ function generateSystemStatsGraph($gData, $key = "", $series= array(), $title = "", $gID=0 ) { - - $title = _("Memory usage"); - $key = "usagePerInterval"; - $series = array( - 'max_mem' => _('Max'), - 'avg_mem' => _('Avergae'), - 'min_mem' => _('Min')); - $gID = 3; - // Add series data to dataSet $dataSet = new pData; $max = 0; @@ -408,7 +426,7 @@ class statistics extends plugin $chart->drawGraphArea(255,255,255,TRUE); $chart->drawGrid(4,TRUE,200,200,200,50); $chart->drawTreshold(0,143,55,72,TRUE,TRUE); - $chart->drawTitle(50,22,"Memory usage",50,50,50,585); + $chart->drawTitle(50,22,$title,50,50,50,585); $chart->drawLegend(650,30,$dataSet->GetDataDescription(),255,255,255); $chart->drawScale($dataSet->GetData(),$dataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2, FALSE);