honeycombio / loadgen

A flexible command-line load generator to create traces in OTel or Honeycomb formats
Apache License 2.0
3 stars 2 forks source link

feat(generator): convert tail recursion to for loop #32

Closed lizthegrey closed 8 months ago

lizthegrey commented 8 months ago

Which problem is this PR solving?

Short description of the changes

$ ./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
lizthegrey commented 8 months ago

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).