Proof of concept: Generating sequence diagrams from profiler traces.
This tool uses the 3rd party component Plantuml to generate sequence diagrams. This is a java application. Threfore you need a Java Runtime installed and in your search path.
This application consists of two parts:
- A minimum profiler to trace method calls in .NET applications. The profiler writes all called methods to a file.
- A sample application that allows starting a .NET application with the profiler. This application also can load the profile and generate a sequence diagram via Plantuml.
Start launcher.exe and run the application to be profiled.
Be aware that a large amount of profiling information is written to the hard disk. Starting a larger application can soon result in 5+ GB. Therefore you can decide when to start collecting data with the "Enable Profiling" checkbox. You can only defer profiling to a later time but you cannot disable it after that. And you cannot attach to a running application.
Go to the tab "Create sequence diagram" and select the profile you collected.
"Edit Pre-Filter" opens a text file that filters a lot of the default .NET namespaces you don't want to see in a sequence diagram. You can add further elements here.
Clicking on "Generate" opens a dialog that lets you define your start function for the sequence diagram. Use the context menu to select the function.
By clicking OK a call tree explorer is openend that shows you all execution traces of the selected start function.
Here you can define you sequence diagram by checking which functions are included and which are not.
Use the context menu to generate the UML diagram. The call tree explorer is kept open. You you can refine the diagram and try again.
The result is shown in an svg viewer. The input plantuml file is written to the output directory.
You can exclude functions in the call tree explorer. If you hide a call that results in a call you want to see the arrow is drawn in blue color. Meaning the method CycleA calls CycleA indirectly and hiding calls in between.