r111619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111618‎ | r111619 | r111620 >
Date:04:25, 16 February 2012
Author:tstarling
Status:ok
Tags:
Comment:
Aggregate stats separately to profiling
Modified paths:
  • /trunk/udpprofile/collector.c (modified) (history)
  • /trunk/udpprofile/debian/changelog (modified) (history)

Diff [purge]

Index: trunk/udpprofile/debian/changelog
@@ -1,3 +1,9 @@
 2+udpprofile (1.4) lucid-wikimedia; urgency=low
 3+
 4+ * Aggregate stats separately to profiling
 5+
 6+ -- Tim Starling <tstarling@wikimedia.org> Thu, 16 Feb 2012 15:24:35 +1100
 7+
28 udpprofile (1.3-1) lucid-wikimedia; urgency=low
39
410 * Added automatic aggregation across DBs to collector
Index: trunk/udpprofile/collector.c
@@ -110,6 +110,7 @@
111111 char hostname[128];
112112 char dbname[128];
113113 char task[1024];
 114+ char stats[] = "stats/";
114115 int r;
115116
116117 struct pfstats incoming;
@@ -139,7 +140,11 @@
140141 updateEntry(dbname, hostname, task, &incoming);
141142
142143 // Update the aggregate entry
143 - updateEntry("all", "-", task, &incoming);
 144+ if (!strncmp(dbname, stats, sizeof(stats) - 1)) {
 145+ updateEntry("stats/all", "-", task, &incoming);
 146+ } else {
 147+ updateEntry("all", "-", task, &incoming);
 148+ }
144149 }
145150 }
146151

Status & tagging log