MCPcopy Create free account
hub / github.com/psf/cachecontrol / run_benchmark

Function run_benchmark

examples/benchmark.py:36–49  ·  view source on GitHub ↗
(sess)

Source from the content-addressed store, hash-verified

34
35
36def run_benchmark(sess):
37 proc = Process(target=start_server)
38 proc.start()
39
40 start = datetime.now()
41 for i in range(0, 1000):
42 sess.get(URL)
43 sys.stdout.write(".")
44 end = datetime.now()
45 print()
46
47 total = end - start
48 print("Total time for 1000 requests: %s" % total)
49 proc.terminate()
50
51
52def run():

Callers 1

runFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…