MCPcopy Index your code
hub / github.com/python/cpython / write_bucketful

Method write_bucketful

Lib/test/test_android.py:434–441  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

432 # Write BUCKET_KB messages, and return the rate at which they were
433 # accepted in KB per second.
434 def write_bucketful():
435 nonlocal line_num
436 start = mock_time()
437 max_line_num = line_num + BUCKET_KB
438 while line_num < max_line_num:
439 stream.write(message.format(line_num))
440 line_num += 1
441 return BUCKET_KB / (mock_time() - start)
442
443 # The first bucketful should be written with minimal delay. The
444 # factor of 2 here is not arbitrary: it verifies that the system can

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected