From: hickert Date: Fri, 20 Aug 2010 06:51:31 +0000 (+0000) Subject: Updated dumpTable function X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b5f55ae87da782b052b78313e063c2e864b4a3f;p=gosa.git Updated dumpTable function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19415 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index 0a4c474a0..b311baf0f 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -287,9 +287,21 @@ class stats $handle = stats::getDatabaseHandle($filename); if(!$handle) return; + $query = + " SELECT ". + " TYPE, PLUGIN, CATEGORY, ACTION, ". + " UUID, DATE(TIMESTAMP, 'unixepoch') as date, ". + " AVG(DURATION), AVG(RENDER_TIME), SUM(AMOUNT), ". + " AVG(MEMORY_USAGE), AVG(CPU_LOAD), INFO ". + " FROM ". + " stats ". + " GROUP BY ". + " TYPE, PLUGIN, CATEGORY, ACTION, UUID, date, INFO ". + " ORDER BY ". + " ID "; + // Create Filter and start query - $filter = "SELECT * FROM {$TABLE_NAME} ORDER BY ID"; - $ret = sqlite_array_query($filter, $handle, SQLITE_ASSOC); + $ret = sqlite_array_query($query, $handle, SQLITE_ASSOC); return($ret); }