Creating Subsystems

Skip to end of metadata
Go to start of metadata
  1. In the Options window, open the MyProfile profile and click  under the list of subsystems.
  2. In the opened Subsystem definition window, specify the subsystem name – Chart visualization and select the subsystem color.

    Now, we need to add rules for our subsystem. All calls that match the rules will be calculated within this subsystem.
  3. .NET uses the System.Windows.Forms.DataVisualization.Charting namespace for providing methods and properties for the Chart Windows forms control. Let’s add the rule for this namespace.
    To do this, click Add and specify System.Windows.Forms.DataVisualization.Charting in the ...and Fully Qualified Name prefix column.
    A rule has two parameters for matching calls: assembly name and namespace name. That’s why subsystems are very useful when analyzing how your app utilizes system components. At the same time, the usage of subsystems for user code is quite narrow. Typically, it can be used either on large solutions (that include multiple projects/namespaces) or for determining the contribution of external libraries (DLLs) into overall app performance.
  4. Our profile will look like follows.
    The order of subsystems in a profile matters. If a call matches two rules from different subsystems, the rule from the subsystem that is upper than the other one in the list of subsystems is applied.
    That’s why in our example we must place Chart visualization above WinForms (as 
    ...DataVisualization.Charting
     is only a part of System.Windows.Forms).
    This can be done with the up and down buttons .

Once we apply the profile to the snapshot, our profiling results will look the following way.

The Chart visualization subsystem takes 322 ms. In the next step we'll try to find out the cause of such time and the way we can decrease it.
Next Page

  • No labels