We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0453809 commit a814b74Copy full SHA for a814b74
docs/spectator/lang/py/perf-test.md
@@ -31,15 +31,13 @@ def elapsed():
31
32
print(f"start spectator-py {location} benchmark")
33
iteration = 1
34
-while True:
+while elapsed() < max_duration:
35
registry.counter("spectator-py.publish", tags).increment()
36
if iteration % 500000 == 0:
37
print(f"iterations={iteration} elapsed={elapsed():.2f}")
38
- if elapsed() > max_duration:
39
- break
40
iteration += 1
41
42
-print(f"iterations={iteration} rate/sec={iteration/elapsed():.2f}")
+print(f"iterations={iteration} elapsed={elapsed():.2f} rate/sec={iteration/elapsed():.2f}")
43
```
44
45
## Results
0 commit comments