equal
deleted
inserted
replaced
328 |
328 |
329 |
329 |
330 def _gc_debug(): |
330 def _gc_debug(): |
331 import gc |
331 import gc |
332 from pprint import pprint |
332 from pprint import pprint |
333 from cubicweb.vregistry import VObject |
333 from cubicweb.appobject import AppObject |
334 gc.collect() |
334 gc.collect() |
335 count = 0 |
335 count = 0 |
336 acount = 0 |
336 acount = 0 |
337 ocount = {} |
337 ocount = {} |
338 for obj in gc.get_objects(): |
338 for obj in gc.get_objects(): |
339 if isinstance(obj, CubicWebTwistedRequestAdapter): |
339 if isinstance(obj, CubicWebTwistedRequestAdapter): |
340 count += 1 |
340 count += 1 |
341 elif isinstance(obj, VObject): |
341 elif isinstance(obj, AppObject): |
342 acount += 1 |
342 acount += 1 |
343 else: |
343 else: |
344 try: |
344 try: |
345 ocount[obj.__class__] += 1 |
345 ocount[obj.__class__] += 1 |
346 except KeyError: |
346 except KeyError: |