Skip to content

Instantly share code, notes, and snippets.

@mleinart
Created February 14, 2012 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mleinart/1831707 to your computer and use it in GitHub Desktop.
Save mleinart/1831707 to your computer and use it in GitHub Desktop.
Patch to fix graphite rendering for data with super tiny difference between min and max
--- webapp/graphite/render/glyph.py.orig 2012-02-14 17:40:44.000000000 -0600
+++ webapp/graphite/render/glyph.py 2012-02-14 17:41:11.000000000 -0600
@@ -1352,6 +1352,9 @@
while f <= end:
yield f
f += step
+ if f == start:
+ yield end
+ return
def toSeconds(t):
@mleinart
Copy link
Author

To patch source:

From root of source tree:

patch -p0 < graphite-tiny_data.patch

re-run 'setup.py install' and restart apache

To patch live instance:

from python site directory (/usr/lib/python2.6/site-packages/)

patch -p1 < graphite-tiny_data.patch

restart apache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment