pg_gather icon indicating copy to clipboard operation
pg_gather copied to clipboard

Showing WaitEvents as percentages

Open psvampa opened this issue 1 year ago • 4 comments

Hello Jobin!

The Session Details section currently presents WaitEvent values as cardinal numbers, E.g., WalWriterMain:1937,WALWrite:40,WALSync:16,CPU:7 What do you think about presenting those cardinal numbers as percentages? Wouldn’t it be more human-readable/friendly? Using cardinal numbers over the data-collection time, we could say something like, “This session was statistically spending ##% of its time doing this, this, and that". It adds no additional value but still, it can help to understand the output.

Best regards,

psvampa avatar Jan 20 '24 05:01 psvampa

Thank you, @psvampa , This is important. This can make the data more human-readable and understandable. I have been thinking about this for quite some time. Technically the SQL statement : https://github.com/jobinau/pg_gather/blob/63f0d7fe522ab5e6ba0eae461e65b10cb03e7bcc/gather_report.sql#L201 Can have % calculation as well.

jobinau avatar Jan 24 '24 05:01 jobinau

Added this modification as part of the commit: https://github.com/jobinau/pg_gather/commit/96de71e60cf8f4b3368766da87b06b1e1e630e09

jobinau avatar Jan 24 '24 06:01 jobinau

Anyone who would like to help the development with testing this feature/modification before the next release, please replace gather_report.sql with dev/report.sql for generating the report. Any feedback would be great.

jobinau avatar Jan 24 '24 06:01 jobinau

I am testing it with the mentioned commit, which looks great. After checking several times with different data collections, I will share this with you. TY, Jobin!

psvampa avatar Jan 24 '24 21:01 psvampa