r113114 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113113‎ | r113114 | r113115 >
Date:00:47, 6 March 2012
Author:asher
Status:ok
Tags:
Comment:
feed graphite 90th percentile instead of 99.9th
Modified paths:
  • /trunk/udpprofile/debian/changelog (modified) (history)
  • /trunk/udpprofile/profiler-to-carbon (modified) (history)

Diff [purge]

Index: trunk/udpprofile/debian/changelog
@@ -1,3 +1,10 @@
 2+udpprofile (1.6) lucid-wikimedia; urgency=low
 3+
 4+ * Domas "set in-RAM cache size to 256M instead of 256k - cuts CPU usage in half on busy systems"
 5+ * Replaced 99.9th percentile calculation with 90th
 6+
 7+ -- Asher Feldman <afeldman@wikimedia.org> Thu, 6 Mar 2012 00:43:00 +0000
 8+
29 udpprofile (1.5) lucid-wikimedia; urgency=low
310
411 * profiler-to-carbon skips non-ascii event keys
Index: trunk/udpprofile/profiler-to-carbon
@@ -80,9 +80,9 @@
8181 message = "%s.count %d %d\n" % ( key, count, now )
8282 logging.debug("sending: %s", message)
8383 graph.send(message)
84 -
 84+
8585 if (db.startswith('stats')): continue
86 -
 86+
8787 real = current[key]['real'] - prior[db][key]['real']
8888 message = "%s.tavg %.3f %d\n" % ( key, real/count, now )
8989 logging.debug("sending: %s", message)
@@ -90,18 +90,18 @@
9191
9292 current[key]['samples'].sort()
9393 tp50 = int(round(len(current[key]['samples']) * 0.5))-1
 94+ tp90 = int(round(len(current[key]['samples']) * 0.9))-1
9495 tp99 = int(round(len(current[key]['samples']) * 0.99))-1
95 - tp999 = int(round(len(current[key]['samples']) * 0.999))-1
9696
9797 message = "%s.tp50 %.3f %d\n" % ( key, float(current[key]['samples'][tp50])*1000, now )
9898 logging.debug("sending: %s", message)
9999 graph.send(message)
100100
101 - message = "%s.tp99 %.3f %d\n" % ( key, float(current[key]['samples'][tp99])*1000, now )
 101+ message = "%s.tp90 %.3f %d\n" % ( key, float(current[key]['samples'][tp90])*1000, now )
102102 logging.debug("sending: %s", message)
103103 graph.send(message)
104104
105 - message = "%s.tp999 %.3f %d\n" % ( key, float(current[key]['samples'][tp999])*1000, now )
 105+ message = "%s.tp99 %.3f %d\n" % ( key, float(current[key]['samples'][tp99])*1000, now )
106106 logging.debug("sending: %s", message)
107107 graph.send(message)
108108

Status & tagging log