MCPcopy Create free account
hub / github.com/ElementsProject/lightning / measure_latency

Function measure_latency

tests/benchmark.py:188–200  ·  view source on GitHub ↗
(node, stop_event)

Source from the content-addressed store, hash-verified

186 l2.start()
187
188 def measure_latency(node, stop_event):
189 latencies = []
190
191 while not stop_event.is_set():
192 time.sleep(0.1)
193
194 start = time.time()
195 node.rpc.help()
196 end = time.time()
197
198 latencies.append(end - start)
199
200 return latencies
201
202 stopme = threading.Event()
203 fut = executor.submit(measure_latency, l2, stopme)

Callers

nothing calls this directly

Calls 1

helpMethod · 0.45

Tested by

no test coverage detected