N *= 2
return times
-
-if __name__ == '__main__':
+def main(argv=None):
import optparse
import tempfile
+ if argv == None:
+ argv = sys.argv[1:]
+
p = optparse.OptionParser(
usage='%prog [options] executable', epilog=__doc__)
p.add_option('-s', '--stdin', dest='stdin', default=False,
p.add_option('-p', '--plot', dest='plot', default=None,
help='Filename for a scaling plot (no plot is generated if this option is not set).')
- options,args = p.parse_args()
+ options,args = p.parse_args(argv)
executable = args[0]
a.set_ylabel('t (s)')
a.legend(loc='best')
f.savefig(options.plot)
+
+if __name__ == '__main__':
+ main()