[Zope3-dev] Re: Performance Testing

Tarek Ziadé tziade at nuxeo.com
Thu Oct 13 12:13:42 EDT 2005


Benji York wrote:

> Tarek Ziadé wrote:
>
>> http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/PerformanceRegressionTool 
>>
>
>
> The unit test decorator looks good; I might prefer a different name 
> than "timedtest", but because I don't write "old-style" unit tests I'm 
> just -0.  The fact that Zope 3 discourages "old-style" unit tests 
> might also be a good reason not to include such a decorator.
>
> The function wrapper for use in doctests doesn't seem like the optimal 
> solution.  I almost never create functions in my doctests, so a 
> function wrapper would either be useless or I'd have to "force" the 
> doctest into creating functions just so I can make performance 
> assertions about them.
>
> Perhaps instead a helper object or function(s).  Maybe something like 
> this:
>
>     >>> resetPystoneTimer()
>     ...
>     >>> elapsedPystones() < 1000
>     True

You are right the function wrapper is kind of overkill for functional 
tests most of the time. This looks better.

I think it could be nice though, to provide a set of utilities, such as 
the decorator and the elapsedPystones() thing,
because i can think of tests where we can use the wrapping approach to 
facilitate test writings. (that's all about wrappers anyway)

For example, when a given function is called in some loops in a test, i 
might want to mark it in the beginning, and go ahead in my test,
 where it can be called several times,  just to avoid adding pystone 
size checks all over the place, because this is not in my mind then.

But this is not the most important thing, as we can probably just get 
ridd of never-used writing style afterwards, the idea is there.

Maybe we can list in the proposal a list of utilities ?

>
[cut]

Tarek

-- 
Tarek Ziadé | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: tziade at nuxeo.com | tel: +33 (0) 6 30 37 02 63
You need Zope 3 - http://www.z3lab.org/



More information about the Zope3-dev mailing list