New submission from jkarp <>:

When repoze.profile is given an application to wrap that takes the form of a
generator, you end up with a useless profile that has only the entries
"<string>:1(<module>)" and "{method 'disable' of '_lsprof.Profiler' objects}".

This is because the way the profiling is being invoked, it only includes the
assignment of a generator object to app_iter. For the application code to be
executed, the generator must be iterated over, and that isn't happening until
after profiling has stopped.

One band-aid solution might be to change repoze.profile to profile
'list(, start_response))' instead of ',

messages: 456
nosy: jkarp
priority: bug
status: unread
title: repoze.profile: useless profile recorded when application is a generator

Repoze Bugs <>
Repoze-dev mailing list

Reply via email to