Some % of Garbage Collection

I need to write a python script that will
look at the local gc logs.

6 sys=0.00, real=0.06 secs]
2019-06-05T07:43:12.029-0500: 1072696.494: [Full GC (Ergonomics) [PSYoungGen: 12146K->0K(1368064K)] [ParOldGen: 2791209K->1995953K(2796544K)] 2803355K->1995953K(4164608K), [Metaspace: 747282K->742139K(1763328K)], 3.0299555 secs] [Times: user=9.22 sys=0.00, real=3.03 secs]
2019-06-05T07:43:17.149-0500: 1072701.614: [GC (Allocation Failure) [PSYoungGen: 1338368K->12240K(1371136K)] 3334321K->2008193K(4167680K), 0.0328488 secs] [Times: user=0.1

That will calculate the garbage collection % of full - like it's 99% full, checking every 5 minutes or something to see if it's increased?
Not sure on approach?

Please find some info below I cut-and-pasted from the forum rules / guidelines:

  • Additional helpful guidelines for all posters (for better, faster replies to questions):
  • (A) Include as many pertinent details as possible in your post. Useful information usually includes: Vendor and version of hardware or software you are using, hardware platform, kernel version (if applicable).
  • (B)
    ~~~
    Use
    text tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags and
    by hand.)
    ~~~

  • (C) For hardware related questions include model name/number of any affected components. For software issues, indicate which commands you are issuing and any error messages if applicable. Accuracy is important -- copy and paste if possible.