~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to scripts/plot-top.py

  • Committer: Michael Hope
  • Date: 2011-09-08 03:27:40 UTC
  • Revision ID: michael.hope@linaro.org-20110908032740-l0rx3olleapcwk6f
Benchmark more sizes and alignments.  Make the figures bigger to make the text smaller.  Put the 'this' results first.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
    colours = iter('bgrcmyk')
22
22
 
 
23
    pylab.figure(1).set_size_inches((16, 12))
23
24
    pylab.clf()
24
25
 
25
26
    for i, variant in enumerate(variants):
26
27
        heights = []
27
28
 
28
29
        for function in functions:
29
 
            matches = [x for x in records if x.variant==variant and x.function==function]
 
30
            matches = [x for x in records if x.variant==variant and x.function==function and x.alignment==8]
30
31
 
31
32
            if matches:
32
33
                match = matches[0]
36
37
 
37
38
        pylab.bar(X+i*width, heights, width, color=colours.next(), label=variant)
38
39
 
39
 
    print X, width
40
40
    axes = pylab.axes()
41
41
    axes.set_xticklabels(functions)
42
42
    axes.set_xticks(X + 0.5)
43
43
 
44
44
    pylab.title('Performance of different variants for %d byte blocks' % bytes)
45
45
    pylab.ylabel('Rate (MB/s)')
46
 
    pylab.legend()
 
46
    pylab.legend(loc='upper left', ncol=3)
47
47
    pylab.grid()
48
 
    pylab.savefig('top-%d.png' % bytes)
 
48
    pylab.savefig('top-%06d.png' % bytes, dpi=72)
49
49
 
50
50
def main():
51
51
    records = libplot.parse()
52
52
 
53
 
    for bytes in [1, 8, 31, 64, 128]:
 
53
    for bytes in libplot.unique(records, 'bytes'):
54
54
        plot(records, bytes)
55
55
 
56
56
    pylab.show()
57
57
 
58
58
if __name__ == '__main__':
59
59
    main()
60