Ludeon Forums

Ludeon Forums

  • September 20, 2020, 04:44:57 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks  (Read 4408 times)

mospidatru

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
[1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« on: February 19, 2020, 05:29:27 PM »

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

Download
Github

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:


Profiler window:


Results in Excel(all timings in ms):


Credits
HugsLib for debug button

License
Mod and source code or his parts feel free to use. Credit is optional.
« Last Edit: March 26, 2020, 11:29:44 AM by mospidatru »
Logged

garfu

  • Muffalo
  • *
  • Posts: 7
  • Refugee
    • View Profile
Re: [1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #1 on: March 17, 2020, 05:30:56 PM »

Any plans to update for 1.1?
Logged

mospidatru

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
Re: [1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #2 on: March 18, 2020, 05:34:30 AM »

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
« Last Edit: March 18, 2020, 05:45:05 AM by mospidatru »
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1436
  • Refugee
    • View Profile
Re: [1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #3 on: March 25, 2020, 11:59:59 PM »

Wow i am very interested in profiling all my mods. I am watching this for 1.1!
Logged

mospidatru

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
Re: [1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #4 on: March 26, 2020, 11:29:14 AM »

Hot update for RW1.1:
https://github.com/bananasss00/RW-HarmonyProfiler/releases/tag/0.2_v1.1-pre

quickly looked through, like everything works.
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1436
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #5 on: March 26, 2020, 03:49:40 PM »

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
« Last Edit: March 26, 2020, 03:51:31 PM by Kiame »
Logged

mospidatru

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #6 on: March 26, 2020, 06:55:12 PM »

Ye, support all mods. HugsLib not needed, but profiler if find in mod implemented hugslib tick he set profiler for him too.
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1436
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #7 on: March 26, 2020, 08:25:25 PM »

Thanks for the clarification!
Logged

Kirmz

  • Muffalo
  • *
  • Posts: 16
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #8 on: April 06, 2020, 05:02:15 AM »

This is... it's too much man too much too much.
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1436
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #9 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!
Logged

mospidatru

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #10 on: April 08, 2020, 01:37:57 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  :)
Logged

hilllcheald

  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
Re: [1.1pre][1.0] HarmonyProfiler - Profile your mods or modpacks
« Reply #11 on: April 24, 2020, 01:16:37 PM »

oh wow. thanks a lot for all the extremely informative and helpful information and links, i need for my healthy recipes project. that was just way too much. appreciating your effort.
« Last Edit: May 08, 2020, 10:02:41 AM by hilllcheald »
Logged