HarmonyProfiler
Need some code refactoring but all features work fine. And sorry for my bad english :)
For example (on my low cpu 3 x 3ghz):In HardcoreSK modpack + another 98 mods profiler set his patches for all mods and all harmony instances(exclude transpiled methods) in ~2 minutes. 5000 patches.
With transpiled methods ~30 minutes, how the game runs on my PC.
My tps on savegame without profiler patches ~200, with 5000 profiler patches for all mods ~60-100
DownloadGithub (https://github.com/bananasss00/RW-HarmonyProfiler/archive/master.zip)
Features
- Profile harmony patches
1. Get all active harmony instances
2. Edit list for interested instances
3. And set profiler for all patches in this instances
- Profile mods
1. Get all active mods(or manually input mod folder names)
2. Edit list for interested mods
3. And set profiler for all selected mods
Profiler affects all HugsLib ticks in mods(if implemented) and custom(not Rimworld Core) workClasses in Defs directory for: ThingDef, Jobs, Interactions, Incidents, Recipes and etc...
- Profile custom methods, classes or namespaces
methods: Verse.Pawn:Tick
methods in class: Verse.Pawn
methods in all classes from namespace: Verse (dont do this for big namespaces like this ;D)
- Top 15
-Review profiler results
-'Copy' button add selected method in to custom list profiler
-Click button with method name for hide entry from Top 15 results
-You can export all collected data in to csv or slk for better review and filtering results in Excel. Slk format contain auto calculated columns width
column AverageTime = 1 tick avg time
column AvgTime*Ticks ~= time spent by the method for all time
Work window can be accessed from developer mode:(https://i.imgur.com/mNEYObc.png)
Profiler window:(https://i.imgur.com/oRgXCUs.png)
Results in Excel(all timings in ms):(https://i.imgur.com/Ue2ru8o.png)
CreditsHugsLib (https://github.com/UnlimitedHugs/RimworldHugsLib/blob/e965062118f2c93a80469acc0dfe82d4d3171b9e/Source/Patches/DebugWindowsOpener_Patch.cs) for debug button
LicenseMod and source code or his parts feel free to use. Credit is optional.
Any plans to update for 1.1?
Quote from: garfu on March 17, 2020, 05:30:56 PM
Any plans to update for 1.1?
Yes, it will be soon.
New for RW1.0:
1) Added full assembly profiling by dllname
2) Added feature for harmony patches dumper. Dump possible harmony patches conflicts, where Prefix patch can disable another prefixes or transpilers
3) some fixes
Wow i am very interested in profiling all my mods. I am watching this for 1.1!
Hot update for RW1.1:
https://github.com/bananasss00/RW-HarmonyProfiler/releases/tag/0.2_v1.1-pre
quickly looked through, like everything works.
Awesome I'll test it out tonight. Just curious do mod need to implent/use hugslib or does this mod support all mods? My mods do use Harmony but I do not use hugslib
Ye, support all mods. HugsLib not needed, but profiler if find in mod implemented hugslib tick he set profiler for him too.
Thanks for the clarification!
This is... it's too much man too much too much.
Thank you again for this great mod! It's helped me find slow spots in some of my mods - especially change dresser - and find other mods that cause intermitant slow downs. Amazingly helpful!
Quote from: Kiame on April 06, 2020, 09:28:56 PM
Thank you again for this great mod! It's helped me find slow spots in some of my mods - especially change dresser - and find other mods that cause intermitant slow downs. Amazingly helpful!
Thanks for feedback. I'm glad the mod was useful :)
oh wow. thanks a lot for all the extremely informative and helpful information and links, i need for my healthy recipes (https://delicerecipes.com/) project. that was just way too much. appreciating your effort.