Advertisement
Guest User

livibetter

a guest
Nov 4th, 2009
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from matplotlib import pyplot
  4. from matplotlib.ticker import IndexLocator
  5. from numpy import *
  6.  
  7. results = [
  8. ('2.6.31-gentoo-r4', [0.15673866271972656, 0.22011380195617675, 0.31147456169128418, 0.31806101799011233, 0.45194501876831056, 0.49375133514404296, 0.61773824691772461, 0.63911833763122561, 0.75951099395751953, 0.78272194862365718, 0.88353796005249019, 0.94253153800964351, 1.0565287590026855, 1.0960891723632813, 1.2079774379730224, 1.2763566017150878, 1.3607078075408936, 1.4153385639190674, 1.5076858043670653, 1.6175025463104249, 1.6524959564208985, 1.7378323554992676, 1.7971437931060792, 1.8734035968780518, 1.9591879844665527, 2.0440726280212402, 2.094032573699951, 2.1864066123962402, 2.2562743663787841, 2.3418245792388914, 2.4131356239318849, 2.5000920772552488]),
  9. ('2.6.31-gentoo-r4-bfs', [0.15105123519897462, 0.15202860832214354, 0.23054533004760741, 0.31636881828308105, 0.37918915748596194, 0.46293921470642091, 0.53474774360656741, 0.61435899734497068, 0.68547730445861821, 0.76638255119323728, 0.83417096138000491, 0.91335644721984866, 0.99857978820800786, 1.062566375732422, 1.1367023468017579, 1.2150913715362548, 1.2890355587005615, 1.3727387905120849, 1.4421934127807616, 1.5104918003082275, 1.592773151397705, 1.6809540271759034, 1.7389869689941406, 1.8142241477966308, 1.8861724376678466, 1.9673441886901855, 2.0324893951416017, 2.1128292083740234, 2.1875843524932863, 2.2638030529022215, 2.3384195804595946, 2.4296010017395018]),
  10. ('2.6.32-rc5', [0.15692081451416015, 0.15577034950256347, 0.23881216049194337, 0.30775957107543944, 0.39050402641296389, 0.46690564155578612, 0.54277920722961426, 0.61949896812438965, 0.69837198257446287, 0.77543320655822756, 0.85235204696655276, 0.93067021369934078, 1.0140983581542968, 1.0921456336975097, 1.1726108551025392, 1.2533286571502686, 1.3232304096221923, 1.4089258670806886, 1.4863292217254638, 1.5622700214385987, 1.6449746131896972, 1.7351542472839356, 1.8334334373474122, 1.880321741104126, 1.9584332466125489, 2.0412515163421632, 2.1100759983062742, 2.1974469661712646, 2.2678318023681641, 2.3443553924560545, 2.4461697578430175, 2.5226269721984864]),
  11. ]
  12.  
  13. ax1 = pyplot.subplot(111)
  14.  
  15. x = range(1, len(results[0][1]) + 1)
  16.  
  17. ax1.hold(True)
  18. for result in results:
  19. ax1.plot(x, array(result[1])/x, label=result[0])
  20.  
  21. ax1.legend(loc=0)
  22. ax1.xaxis.set_minor_locator(IndexLocator(1, 0))
  23. ax1.grid(which='major', linestyle='-')
  24. ax1.grid(which='minor')
  25. ax1.set_ylabel('Cost per 1000000 count per process (second)')
  26. ax1.set_xlabel('Concurrent processes')
  27. ax1.set_title('Cost')
  28.  
  29. pyplot.show()
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement