smisk.util.benchmark

New in version 1.1.2.

Module contents

smisk.util.benchmark.benchmark(name='benchmark', iterations=1000000, outfp=sys.stderr, it_subtractor=0.0)

Measure raw performance.

Upon iteration end or exception raised, prints time taken and resources used to outfp.

Example:

from smisk.util.benchmark import benchmark

for x in benchmark('run 1', 10000):
  f = open('/tmp/mos', 'r')
  f.close()

Table Of Contents

Previous topic

smisk.util

Next topic

smisk.util.DateTime

This Page

Quick search