andrewrk / poop

Performance Optimizer Observation Platform
MIT License
788 stars 50 forks source link

Use metric prefixes and limit to 3 significant figures #30

Closed candrewlee14 closed 1 year ago

candrewlee14 commented 1 year ago

image

This PR is the result of a spike into looking for ways to show a set amount of sigfigs. Instead of scientific notation, I decided to try metric prefixes (T, G, M, K, etc) since it fits in with how we already display max RSS & durations.

I feel like I landed on something that looks good and communicates the info pretty well imo. The central alignment of each of the columns comes trivially from the comptime-known sigfig limit.

There's no pressure to accept this PR if this isn't how you'd like things to be displayed, just want to make that clear.

Potential future enhancement: I think it may be useful to color the different metric prefixes on a grayscale getting lighter as they get bigger.

Closes #28 Related to #24


Status quo for comparison:

image

andrewrk commented 1 year ago

I love it!

dweiller commented 1 year ago

Using kilo-seconds seem a bit strange, especially going from 999s (which is 16m39s) to 1ks. I think minutes should be used - you can get to 59940s = 999m.