[Zope3-dev] Re: Performance Testing
Benji York
benji at zope.com
Thu Oct 13 11:05:44 EDT 2005
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
The proposal also includes a "top n slowest tests" feature, which I'm +1
on, but we could use a bit more specific proposals.
The proposal does not address the use case of measuring the time to
process a particular request. It might be OK to have a separate
proposal for that, but it would be nice to see if there would be a good
reason to add that here too. (I'll address this a bit more in a reply to
Stephan.)
--
Benji York
Senior Software Engineer
Zope Corporation
More information about the Zope3-dev
mailing list