Pystone measurement decorator

Category: Python - Education

This script explains how to check that a given function does not run slower than a given pystone rate. It first calculates the pystone ratio on your box. This decoraone ratiot to use in production code, and would rather fit in functional or unit tests. This make performance tests portable to any box and fits performance regression tests you would want to run in unit tests.DurationError is an AssertionError so it is reported as a failure in tests. local_pystone() is separated so you can call it once for many tests,and give it in the second argument of the decorator. TOLERANCE is used to prevent failures for a busy CPU. (it's faster than using a 3-times test like hotshot does) Date: 05 March, 2012


Pystone Measurement - Pystone Rate - Pystone Ratio - Pystone - Measurement - Ratio

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

This script provides a manual Beats per Minute (BPM) counter for DJs.

developer Developer: javascriptsource.com
license License: Freeware
operating systems Operating System: All


This stopwatch does even include the basic features of Start, Stop, and of course, Reset.

developer Developer: javascriptsource.com
license License: Freeware
operating systems Operating System: All


SmokePing is a latency measurement tool.

developer Developer: oss.oetiker.ch
license License: Freeware
operating systems Operating System: All


TimeSaver is simple time management application.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


This script defines a class using the error propagation formulae of physicists.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


It will calculate the conductor's short circuit current, total cantilever load, short circuit force transmitted to the GIS, heat loss by radiation & convection, equivalent power loss and many other more indicators.

developer Developer: mathworks.com
license License: Freeware
operating systems Operating System: All


Unum stands for 'unit-numbers' and is a Python module that allows defining and manipulating true quantities, i.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


Shared objects work like normal data types but can create a alias variable or can be used as pass-by-reference arguments.

developer Developer: mathworks.com
license License: Freeware
operating systems Operating System: All


This script uses the 'Multicast' class to multiplex messages/attribute requests to objects which share the same interface.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All