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 | + |
2 | 8 | udpprofile (1.3-1) lucid-wikimedia; urgency=low |
3 | 9 | |
4 | 10 | * Added automatic aggregation across DBs to collector |
Index: trunk/udpprofile/collector.c |
— | — | @@ -110,6 +110,7 @@ |
111 | 111 | char hostname[128]; |
112 | 112 | char dbname[128]; |
113 | 113 | char task[1024]; |
| 114 | + char stats[] = "stats/"; |
114 | 115 | int r; |
115 | 116 | |
116 | 117 | struct pfstats incoming; |
— | — | @@ -139,7 +140,11 @@ |
140 | 141 | updateEntry(dbname, hostname, task, &incoming); |
141 | 142 | |
142 | 143 | // 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 | + } |
144 | 149 | } |
145 | 150 | } |
146 | 151 | |