MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / _bench

Function _bench

tests/benchmarks/test_state_building.py:54–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 @benchmark
53 def bench():
54 async def _bench():
55 state = State(models={}, apps=StateApps())
56 for migration in migrations:
57 await migration.apply(state, dry_run=True, schema_editor=None)
58 assert len(state.models) == 200
59
60 loop.run_until_complete(_bench())

Callers 1

benchFunction · 0.70

Calls 3

StateClass · 0.90
StateAppsClass · 0.90
applyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…