MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / go

Function go

test/aaa_profiling/test_memusage.py:75–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73def assert_cycles(expected=0):
74 def decorate(fn):
75 def go():
76 fn() # warmup, configure mappers, caches, etc.
77
78 gc_collect()
79 gc_collect()
80 gc_collect() # multiple calls seem to matter
81
82 # gc.set_debug(gc.DEBUG_COLLECTABLE)
83 try:
84 return fn() # run for real
85 finally:
86 unreachable = gc_collect()
87 assert unreachable <= expected
88 gc_collect()
89
90 return go
91

Callers 15

test_merge_loadMethod · 0.70
test_attribute_setMethod · 0.70
test_expire_lotsMethod · 0.70
test_query_colsMethod · 0.70
test_a_to_b_plainMethod · 0.70
test_a_to_b_aliasedMethod · 0.70
test_a_to_dMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected