summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f8a094)
raw | patch | inline | side by side (parent: 6f8a094)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Aug 2010 06:51:31 +0000 (06:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Aug 2010 06:51:31 +0000 (06:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19415 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_stats.inc | patch | blob | history |
index 0a4c474a0b0ddc2299ba7bc4b3e83bc303fdac6e..b311baf0f454130e1e34c4240d10e040749ba01c 100644 (file)
$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);
}