Software Engineering, Web Development and 3D Design

Visualizing Backoff Functions With Gnuplot

Today I was building some retry logic for some code that forwarded data to a third-party service and wanted to visualize the backoff function I had written. I wanted to see how many retries would be made in the 10-15 minute window after the initial retry. Gnuplot was the obvious choice for visualizing this as I had recently used it for some data exploration work and knew it had built-in support for plotting mathematical functions. The final result looks like this:

backoff comparison plot

Asdf Performance

I’ve been a maintainer of asdf for about 6 years now. Most of my work these last several years has been fixing bugs, writing automated tests to catch regressions, and ensuring overall correctness across various operating systems. Maintaining a tool written in Bash isn’t easy. For most things there are far more edge cases and compatibility issues than happy paths. Certain commands need to be banned from the codebase to ensure compatibility across operating systems. Bash strict mode also helps but it introduces other issues that have to be worked around.

All this to say I haven’t had a lot of time to step back and assess the other aspects of asdf. Other maintainers have stepped up and helped with documentation and UX, but performance has fallen by the wayside. Over the last couple of months I’ve noticed some asdf commands that I use often seem to have gotten slower. Many asdf commands are fairly slow but with the way asdf was designed it is seldom a problem. asdf current was never fast enough to be used as part of a shell prompt showing the current versions, but that was user experience enhancement that wasn’t critical. But it seems like things are getting worse and I wanted to assess performance. In this post I am going to benchmark several asdf commands and see how their performance has changed over time.