MCPcopy
hub / github.com/benoitc/gunicorn / create_arbiter

Function create_arbiter

benchmarks/dirty_streaming.py:147–158  ·  view source on GitHub ↗

Create a test arbiter for benchmarks.

()

Source from the content-addressed store, hash-verified

145
146
147def create_arbiter():
148 """Create a test arbiter for benchmarks."""
149 cfg = Config()
150 cfg.set("dirty_timeout", 300)
151 log = MockLog()
152
153 arbiter = DirtyArbiter(cfg=cfg, log=log)
154 arbiter.alive = True
155 arbiter.workers = {1234: mock.Mock()}
156 arbiter.worker_sockets = {1234: '/tmp/worker.sock'}
157
158 return arbiter
159
160
161class BenchmarkResults:

Callers 2

Calls 4

setMethod · 0.95
ConfigClass · 0.90
DirtyArbiterClass · 0.90
MockLogClass · 0.70

Tested by

no test coverage detected