sqlite-object-cache icon indicating copy to clipboard operation
sqlite-object-cache copied to clipboard

Suggested Improvements to the Stats

Open nickchomey opened this issue 10 months ago • 6 comments

I'm grateful for how detailed the stats are - not just mean, but a full distribution. Likewise there's useful stats on general things like total request duration, RAM usage, mysql queries etc...

But there's various things that make it difficult to parse useful information the stats, as well as some useful stats are missing

  1. It could be better organized - a gap or subheading for things like Ratios, Times, etc....
  2. Likewise separate sections for SQLite vs APCu vs In-Ram/process vs MySQL
  3. Consistent stats and labels for each section - e.g. SQLite has Get, Save, Delete, etc... while APCu has Hit, Miss, Save times (and SQlite has hit times as well - how does that differ from the other sqlite stats?). Or perhaps instead of grouping by storage type, group by action (get/set) and each row is a different storage type (sqlite, apcu, etc)
  4. Add stats that show the total time per request spent talking to APCu or SQLite (it seems like it only tracks the distribution of times for single operations, rather than the aggregate of 300 SQLite Get/Set/Delete per request). This is surely the most useful information, as everything is ultimately per-request. The granular details of time per get/set is much less informative.

nickchomey avatar Feb 28 '25 15:02 nickchomey

Yeah, I know. Random presentation, conceptually chaotic, etc. Apologies.

I confess I just hacked in the measurements to make sure things are working the way we need them to. Cleaning up all this is on my list.

I deliberately made the presentation a bit clunkly and static because I hope people haven't been scraping them, and so will howl if I make them work more clearly. (I'm a self-funded indy developer, not that it's any excuse.)

OllieJones avatar Mar 02 '25 12:03 OllieJones

None of this is meant to malign you! You've done tremendous work and provided it for free - I (and hopefully everyone else) am grateful for it.

Just pointing out ways in which it could improve

Ill let you know if I find time to implement any improvements to the stats

nickchomey avatar Mar 02 '25 13:03 nickchomey

Hey, I don't feel maligned, not at all. I wish I could do more and that testing were easier. Well, front end stuff is easier since the Redmond Middle School Science Projects (Internet Explorer and pre-Chromium Edge) went in the bitbucket of history where they always belonged. But still.

Thanks for the suggestions. It's nice to know you care enough to think about all this.

I'll give it a shot. (BTW, pull requests are cool!)

OllieJones avatar Mar 02 '25 20:03 OllieJones

I'm going to submit a PR soonish that tidies up the stats table a bit. The visualization Issue might have to wait though.

nickchomey avatar Mar 02 '25 21:03 nickchomey

I just tried for a couple hours to improve things, but it is excessively difficult to wrap my head around the considerable inconsistencies between the different measurement data per storage (RAM, apcu, sqlite), as well as the variable names/captions etc...

Sorry, I dont think I can't be helpful here. I think the whole thing needs a considerable refactor, and that seems like something that would be best done by you.

The same stats (get/set/delete times, hit/miss count, hit ratio, etc...) should be measured per storage method, and have the same variable names and captions.

nickchomey avatar Mar 02 '25 23:03 nickchomey

Thanks for trying. Yup, it's a mess, no doubt.

OllieJones avatar Mar 04 '25 13:03 OllieJones