sys.modules
(seconds, repeat)
| 39 | yield count // seconds |
| 40 | |
| 41 | def from_cache(seconds, repeat): |
| 42 | """sys.modules""" |
| 43 | name = '<benchmark import>' |
| 44 | module = types.ModuleType(name) |
| 45 | module.__file__ = '<test>' |
| 46 | module.__package__ = '' |
| 47 | with util.uncache(name): |
| 48 | sys.modules[name] = module |
| 49 | yield from bench(name, repeat=repeat, seconds=seconds) |
| 50 | |
| 51 | |
| 52 | def builtin_mod(seconds, repeat): |
nothing calls this directly
no test coverage detected
searching dependent graphs…