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

« back to all changes in this revision

Viewing changes to scripts/plot-sizes.py

  • Committer: Michael Hope
  • Date: 2011-08-31 23:52:05 UTC
  • Revision ID: michael.hope@linaro.org-20110831235205-gwc0igvevvhyyop8
Various updates to the benchmark plotting scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import pylab
10
10
import pdb
11
11
 
12
 
def plot(records, function):
 
12
def plot(records, function, alignment=None):
13
13
    variants = libplot.unique(records, 'variant')
14
14
    records = [x for x in records if x.function==function]
15
15
 
16
 
    bytes = libplot.unique(records, 'bytes')
 
16
    if alignment != None:
 
17
        records = [x for x in records if x.alignment==alignment]
 
18
 
 
19
    alignments = libplot.unique(records, 'alignment')
 
20
    assert len(alignments) == 1
 
21
    aalignment = alignments[0]
 
22
 
 
23
    bytes = libplot.unique(records, 'bytes')[0]
17
24
 
18
25
    colours = iter('bgrcmyk')
19
26
    all_x = []
36
43
 
37
44
    pylab.legend(loc='upper left')
38
45
    pylab.grid()
39
 
    pylab.title('%s in MB/s' % function)
 
46
    pylab.title('%(function)s of %(aalignment)s byte aligned, %(bytes)s byte blocks' % locals())
40
47
    pylab.xlabel('Size (B)')
41
48
    pylab.ylabel('Rate (MB/s)')
42
49
    pylab.semilogx()