Skip to content

Instantly share code, notes, and snippets.

@jul
Created June 21, 2012 08:17
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 jul/2964519 to your computer and use it in GitHub Desktop.
Save jul/2964519 to your computer and use it in GitHub Desktop.
cache war
from pylab import *
_value=[ 26.190, 26.964, 27.504, 27.692, 29.121, 30.657, 79.694]
_title=['dict +nc','dict' , 'repoze', 'fixed', 'repoze - mono', 'beaker', 'nocache' ]
figure(1)
lim=7
pos = arange(len(_value[:lim]))+.5
xticks(pos,_title[:lim])
ylabel("execution time (seconds)")
title("Impact of different caches on parsing 193114 lines with yahi")
rect=bar(pos,_value[:lim],align='center',width=.8)
def autolabel(rects):
# attach some text labels
# taken from http://matplotlib.sourceforge.net/gallery.html
for rect in rects:
height = rect.get_height()
text(rect.get_x()+rect.get_width()/2., .9*height,
'%.1f'%height, ha='center', va='bottom',color='white')
autolabel(rect)
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment