New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The greenlet tree shouldn't print locals that have no values #1275

Closed
jamadden opened this Issue Sep 7, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jamadden
Member

jamadden commented Sep 7, 2018

In a real application, printing the greenlet tree wound up printing lots of greenlets like this:

 :    Greenlet Locals:
 :      Local <type 'gevent._local.local'> at 0x7fa559329980
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa5595b4c20
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa5ba0817c0
 :        {'__decimal_context__': Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999, capitals=1, flags=[], traps=[DivisionByZero, Overflow, InvalidOperation])}
 :      Local <class 'perfmetrics.clientstack.ClientStack'> at 0x7fa5b5f54bd0
 :        {'stack': []}
 :      Local <type 'gevent._local.local'> at 0x7fa558ecd280
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559329c20
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa558e6ca60
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa5593291a0
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559310ec0
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559310c20
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa558eaad00
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559310440
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa558ecd520
 :        {}
 :      Local <class 'transaction._manager.ThreadTransactionManager'> at 0x7fa5ba788950
 :        {'_synchs': <transaction.weakset.WeakSet object at 0x7fa5ba3072d0>,
 :     '_txn': None,
 :     'explicit': False}
 :      Local <type 'gevent._local.local'> at 0x7fa558ecdd00
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559689670
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559329ec0
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa559310980
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa558e8e0c0
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa566501f30
 :        {'working_set': set([])}
 :      Local <type 'gevent._local.local'> at 0x7fa558eaaa60
 :        {}
 :      Local <type 'gevent._local.local'> at 0x7fa5593296e0
 :        {}

All those empty values should be elided, they don't add anything but take up space.

@jamadden jamadden added the enhancement label Sep 7, 2018

@jamadden jamadden closed this in 02eb41d Sep 8, 2018

jamadden added a commit that referenced this issue Sep 8, 2018

Merge pull request #1276 from gevent/issue1275
Do not print locals that have no values. Fixes #1275.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment