Is there a way to attach a profiler?

I've noticed that I see occasional minor hitches. To be specific: the framerate will sometimes drop from 60 FPS to 58 of 57 for a few frames. It's not debilitating, but it's just enough that scrolling when walking hitches slightly noticeably. It bothers me and I wanted to see if I could figure out a root cause.

I have made very extensive changes to huge portions of the ruby engine for RPG Maker VX Ace. I can send along a project containing them all, but I suspect it would take days to read and understand the entirety of it. Moreover, the code organization is not awesome because the lack of good project-wide 'find usage' - or find at all 😉 - makes refactoring or moving code unappealing. And, even once you understand it all, figuring out why it hitches occasionally is like looking for a needle in a haystack.

A profiler, however, might give me some insights into whether any of the code I've added could be hitting degenerate cases or is simply performing expensive operations each frame that I didn't realize.

I presume that the RPG Maker folks themselves don't sell or offer one, but I'm happy to use any generic ruby profiler if it would work. I figured I'd ask whether there's a selection of choice before trying to just 'attach' something random from the internet.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-attach-a-profiler.86728/