It seems that building an oscilloscope on top of an Arduino board is some sort of rite of passage. Do a duckduckgo search and you will see that all the good names for this kind of project are already taken, so I have decided to name mine just oscilloscope. In my defense, I'll say that I have written mine because I needed the most basic of oscilloscopes and it's just easier to build one from scratch than to adapt some already existing code.
I've written my oscilloscope code it in order to inspect a single-channel periodic signal with a frequency close to 250 Hz. My first trivial attempt at the task already recorded the signal at 5 kHz and transmitted it over USB without the need to buffer data in the RAM of the microcontroller, so I haven't bothered speeding it up.
The main bottleneck in my case is the serial transmission. Trying to collect more than 5800 samples per second will likely result in the loss of some of them. I've written some extra code that checks for missing samples, but it never detects problems at 5 kHz and, frankly, I'm OK with twenty samples per cycle.
All in all, putting together the C firmware and the Python client, the project takes less than 130 lines. The program that checks for periodicity, finds the frequency and aligns the cycles to display them adds 90 extra lines. The output of this program looks like this:
Here's the link to the github repository.