https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113114
Revision: 113114
Author: asher
Date: 2012-03-06 00:47:05 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
feed graphite 90th percentile instead of 99.9th
Modified Paths:
--------------
trunk/udpprofile/debian/changelog
trunk/udpprofile/profiler-to-carbon
Modified: trunk/udpprofile/debian/changelog
===================================================================
--- trunk/udpprofile/debian/changelog 2012-03-06 00:32:48 UTC (rev 113113)
+++ trunk/udpprofile/debian/changelog 2012-03-06 00:47:05 UTC (rev 113114)
@@ -1,3 +1,10 @@
+udpprofile (1.6) lucid-wikimedia; urgency=low
+
+ * Domas "set in-RAM cache size to 256M instead of 256k - cuts CPU usage in
half on busy systems"
+ * Replaced 99.9th percentile calculation with 90th
+
+ -- Asher Feldman <[email protected]> Thu, 6 Mar 2012 00:43:00 +0000
+
udpprofile (1.5) lucid-wikimedia; urgency=low
* profiler-to-carbon skips non-ascii event keys
Modified: trunk/udpprofile/profiler-to-carbon
===================================================================
--- trunk/udpprofile/profiler-to-carbon 2012-03-06 00:32:48 UTC (rev 113113)
+++ trunk/udpprofile/profiler-to-carbon 2012-03-06 00:47:05 UTC (rev 113114)
@@ -80,9 +80,9 @@
message = "%s.count %d %d\n" % ( key, count, now )
logging.debug("sending: %s", message)
graph.send(message)
-
+
if (db.startswith('stats')): continue
-
+
real = current[key]['real'] - prior[db][key]['real']
message = "%s.tavg %.3f %d\n" % ( key, real/count, now )
logging.debug("sending: %s", message)
@@ -90,18 +90,18 @@
current[key]['samples'].sort()
tp50 = int(round(len(current[key]['samples']) * 0.5))-1
+ tp90 = int(round(len(current[key]['samples']) * 0.9))-1
tp99 = int(round(len(current[key]['samples']) * 0.99))-1
- tp999 = int(round(len(current[key]['samples']) * 0.999))-1
message = "%s.tp50 %.3f %d\n" % ( key,
float(current[key]['samples'][tp50])*1000, now )
logging.debug("sending: %s", message)
graph.send(message)
- message = "%s.tp99 %.3f %d\n" % ( key,
float(current[key]['samples'][tp99])*1000, now )
+ message = "%s.tp90 %.3f %d\n" % ( key,
float(current[key]['samples'][tp90])*1000, now )
logging.debug("sending: %s", message)
graph.send(message)
- message = "%s.tp999 %.3f %d\n" % ( key,
float(current[key]['samples'][tp999])*1000, now )
+ message = "%s.tp99 %.3f %d\n" % ( key,
float(current[key]['samples'][tp99])*1000, now )
logging.debug("sending: %s", message)
graph.send(message)
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs