We spend a lot of time managing the go runtime stack and tail recursing.
Short description of the changes
Manually handle our stack instead.
$ ./loadgen --depth=10 --extra=10 --loglevel=info --nspans=50 --sender=dummy --tps=5000 --tracecount=-1 --tracetime=30s --debugport=6060
host: https://api.honeycomb.io:443, dataset: loadgen, apikey: ...
ngenerators: 150000.000000 interval: 6µs
all generators started, switching to Running state
^C
shutting down from operating system signal
stopping generators from stop signal
trace counter exiting after 864856 traces
sender sent 864855 traces with 54853738 spans
$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 54853738/864855.
63.42535800798978
Don't bother merging this. It makes the code much less readable, and doesn't solve the actual problem. It does make running in dummy mode marginally faster, but the real problem is fielder (see #33).
Which problem is this PR solving?
Short description of the changes