Changes in benchmark/plot.py [f34f95c:44706d1]
- File:
-
- 1 edited
-
benchmark/plot.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/plot.py
rf34f95c r44706d1 40 40 } 41 41 42 def plot(data, x, y , out):42 def plot(data, x, y): 43 43 fig, ax = plt.subplots() 44 44 colors = itertools.cycle(['#0095e3','#006cb4','#69df00','#0aa000','#fb0300','#e30002','#fd8f00','#ff7f00','#8f00d6','#4b009a','#ffff00','#b13f00']) … … 67 67 ax.yaxis.set_major_formatter( EngFormatter(unit=field_names[y].unit) ) 68 68 plt.legend(loc='upper left') 69 if out: 70 plt.savefig(out) 71 else: 72 plt.show() 69 plt.show() 73 70 74 71 … … 78 75 parser = parser = argparse.ArgumentParser(description='Python Script to draw R.M.I.T. results') 79 76 parser.add_argument('-f', '--file', nargs='?', type=argparse.FileType('r'), default=sys.stdin) 80 parser.add_argument('-o', '--out', nargs='?', type=str, default=None)81 parser.add_argument('-y', nargs='?', type=str, default="")82 77 83 78 try: … … 108 103 fields.add(label) 109 104 110 if not options.out : 111 print(series) 112 print("fields") 113 for f in fields: 114 print("{}".format(f)) 105 print(series) 106 print("fields") 107 for f in fields: 108 print("{}".format(f)) 115 109 116 if options.y and options.y in field_names.keys(): 117 plot(data, "Number of processors", options.y, options.out) 118 else: 119 if options.y: 120 print("Could not find key '{}', defaulting to 'ns per ops'".format(options.y)) 121 plot(data, "Number of processors", "ns per ops", options.out) 110 plot(data, "Number of processors", "ns per ops")
Note:
See TracChangeset
for help on using the changeset viewer.