All PRs

Feature: lets asciigraph cli to plot many series in the same chart.

My main role on 2023 was maintaining and optimizing a Ruby on Rails legacy webapp.The frontend relied heavily on a JavaScript toolkit that imitated the Rails MVC architecture.

The webapp was very slow. Heroku metrics showed a memory bloat consuming all the available RAM and the SWAP space every time the app had its daily reset.

Along the flamegraph chart provided by rack mini profiler gem, I wrote a small ruby function to measure memory allocations done by code snippets passed as block argument to my method. Once my method measure the memory allocations, it wrote them into a file.

The missing tool on my toolbelt was a CLI command to quickly plot numbers on the terminal. This way, I could do tail --follow file_with_memory_allocations.txt and pipe the output to that CLI tool.

The tool I found was asciigraph, a “Go package to make lightweight ASCII line graphs ╭┈╯.”. This program was working fine, but I could only display a single plot on the graph chart.

I read the source code of the project, and I figure out it was pretty easy to make this feature. So I submitted this article’s PR to implement the feature.