Tarek Ziadé wrote:
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:
>>> elapsedPystones() < 1000
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
Senior Software Engineer
Zope3-dev mailing list