mirror of
https://github.com/chatmail/relay.git
synced 2026-05-18 20:08:21 +00:00
add ping-pong bench and formatting
This commit is contained in:
@@ -68,9 +68,10 @@ def benchmark(request):
|
||||
for i in range(num):
|
||||
now = time.time()
|
||||
func()
|
||||
durations.append(time.time()-now)
|
||||
durations.append(time.time() - now)
|
||||
durations.sort()
|
||||
request.config._benchresults[name] = durations
|
||||
|
||||
return bench
|
||||
|
||||
|
||||
@@ -84,7 +85,6 @@ def pytest_terminal_summary(terminalreporter):
|
||||
tr.write_line(f"{name: <30} {median:2.4f} seconds")
|
||||
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def imap(maildomain):
|
||||
return ImapConn(maildomain)
|
||||
|
||||
Reference in New Issue
Block a user