It's very nice to use I think:
@require('s1 != 0')
def inv(s1): return 1/s1
or
@require('x != 0')
@enshure('result > 0')
def quad(x): return x*x*x / x
For more information just ask me. I'll put the code somewhere, soon.
- stanz
Computer Science, (Web-)Development and DSP
@require('s1 != 0')
def inv(s1): return 1/s1
@require('x != 0')
@enshure('result > 0')
def quad(x): return x*x*x / x
import hotshotevery view-method that should be profiled got:
PROF = hotshot.Profile("plik.prof")
from settings import PROF
PROF.start()
(...)
PROF.stop()
import hotshot.stats
stats = hotshot.stats.load("plik.prof")
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)