Mutagen-Modding / Mutagen.Bethesda.Analyzers

A project to diagnose and analyze the health of a mod or a load order
GNU General Public License v3.0
18 stars 5 forks source link

Timing Per Analyzer #125

Open Noggog opened 2 months ago

Noggog commented 2 months ago

Add mechanisms to report timing of each analyzer being run

Elscrux commented 3 weeks ago

Needs some thoughts because we currently don't really have any info that we get about the analyzer itself, we just report topics out of the analyzer if applicable. So I think there would need to be a new system that various drivers would call into which can be extended with various functionality like a time keeping feature. Or is this too open and we actually just need it for this one feature and nothing else? The question would also be how we deal with the resulting data, how we expose it to outside sources in case they might be interested etc.

Noggog commented 3 weeks ago

I was thinking that we'd just have an upgrade to the engine where it reports that it's starting to run an analyzer, and when it's done running that same analyzer. (would probably be necessary for UI display, too). This would be separate from the topic reporting pipeline mechanisms. It wouldn't attach any extra metadata (at least in this first pass) other than some basics like what the analyzer type was, and maybe the record/mod in question it was being run on. The resulting mechanisms could then do some stopwatch timings and then print the average run time per analyzer type, for ex.