from benchmarker import Benchmarker """ Objects data benchmarks. """ if __name__ == "__main__": b = Benchmarker() header = "| Test | FPS |\n| --- | --- |\n" output = header[:] rows = [] b.start() rows.append( b.run(boxes=True, images=True, passes="_img", row="--boxes --images --passes _img")) b.start() rows.append( b.run(boxes=True, images=True, passes="_id", row="--boxes --images --passes _id")) b.start() rows.append( b.run(boxes=True, images=True,
## This script was derived from ## 'examples/phase/anisotropy/input.py' if __name__ == "__main__": from fipy.tools.parser import parse numberOfElements = parse('--numberOfElements', action = 'store', type = 'int', default = 40) from fipy.tools import numerix N = int(numerix.sqrt(numberOfElements)) from benchmarker import Benchmarker bench = Benchmarker() bench.start() Length = N * 2.5 / 100. nx = N ny = N dx = Length / nx dy = Length / ny radius = Length / 4. seedCenter = (Length / 2., Length / 2.) initialTemperature = -0.4 from fipy.meshes.grid2D import Grid2D mesh = Grid2D(dx=dx, dy=dy, nx=nx, ny=ny) bench.stop('mesh') bench.start()
$ python setup.py efficiency_test """ __docformat__ = 'restructuredtext' if __name__ == "__main__": from fipy.tools.parser import parse from benchmarker import Benchmarker bench = Benchmarker() numberOfElements = parse('--numberOfElements', action='store', type='int', default=100) bench.start() from fipy.tools import numerix nx = int(numerix.sqrt(numberOfElements)) ny = nx dx = 1. dy = 1. from fipy.meshes.grid2D import Grid2D mesh = Grid2D(nx=nx, ny=nx, dx=dx, dy=dy) bench.stop('mesh') print bench.report(numberOfElements=numberOfElements)