Maoni0 / realmon

A monitoring tool that tells you when GCs happen in a process and some characteristics about these GCs
MIT License
281 stars 25 forks source link

Added the optional stats_mode configuration for printing heap stats on a timer #11

Closed MokoSan closed 2 years ago

MokoSan commented 2 years ago

Added the optional stats_mode configuration for printing heap stats on a timer.

The format of the period of the timer is given by a period magnitude that's an int and a period type that's either m to represent minutes or s to represent seconds.

An example of the configuration is:

stats_mode:
    # Print the heap stats on a timer with m: minutes; s: seconds.
    timer: 30s

If the stats_mode isn't specified, the user can still press s to manually display the heap stats.

MokoSan commented 2 years ago

As a heads up, this PR extends the behavior @NickCraver added for https://github.com/Maoni0/realmon/pull/3.

MokoSan commented 2 years ago

Thanks for the feedback! LOL - I used the range syntax in one spot but didn't in the other; glad you caught that!

Maoni0 commented 2 years ago

thanks @MokoSan! I'll merge this now. I'm actually taking the rest of the day off so I will look at your other PR tomorrow. so glad to see your contributions! 🙂