Skip to content

Commit

Permalink
modify plot_bps.py
Browse files Browse the repository at this point in the history
  • Loading branch information
starpos committed Mar 19, 2012
1 parent f662604 commit 9521489
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/plot_bps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@
def doMain():

if len(sys.argv) < 2:
print "Usage %s [throughput.plot]" % sys.argv[0]
print "Usage %s [throughput.plot] (template) ([yrange])" % sys.argv[0]
print r"template is like 'bps_%s_bs%s.png'"
print r"yrange is like '0:*'"
throughputPlotPath = sys.argv[1]
if len(sys.argv) >= 3:
outputTemplate = sys.argv[2]
else:
outputTemplate = 'bps_%s_bs%s.png'
if len(sys.argv) >= 4:
yRange = sys.argv[3]
else:
yRange = '0:*'

patternMap = {'rnd':'random', 'seq':'sequential'}
pairs = [(x, y) for x in ['rnd', 'seq'] for y in ['512', '4k', '32k', '256k']]
Expand All @@ -36,7 +42,7 @@ def doMain():
ylabel = 'Throughput [MB/sec]'

plotPerformanceData(c, titleTemplate, outputTemplate, targetColumn, ylabel, patternMap, pairs,
scale=Decimal('1')/Decimal('1000000'), xRange='*:*', yRange='0:5000')
scale=Decimal('1')/Decimal('1000000'), xRange='*:*', yRange=yRange)
f.close()

if __name__ == "__main__":
Expand Down

0 comments on commit 9521489

Please sign in to comment.