dotTrace Web Help

For large and complicated applications, it normally takes a lot of time to profile them. While analysing a snapshot you may find functions or even classes that seem to be time-consuming. It would definitely help to make sure that optimizing those functions and classes can increase overall application performance. The Adjust Function option allows you to instantly see the impact of optimizing a function to a certain extent.

If you want to exclude the selected function or reduce the execution time practically to zero, you can easily do it.

To reduce the execution time of a function call to zero
  1. Select a function.
  2. Do one of the following:
    • On the menu bar, choose Edit | Adjust Time | Optimize Current Instance.
    • Right-click the function, then click Adjust Time | Optimize Current Instance on the context menu.
    • Press Del.
To reduce the execution time of all function calls to zero
  1. Select a function.
  2. Do one of the following:
    • On the menu bar, choose Edit | Adjust Time | Optimize All Instances.
    • Right-click the function, then click Adjust Time | Optimize All Instances on the context menu.
    • Press Shift+Del.

If you plan to optimize the selected function to a certain extent only or you need fine-grained control on time adjustment, use the Adjust Time dialog box.

To adjust execution time of a function or class
  1. Choose a function you want to examine.
  2. On the menu bar, choose Edit | Adjust Time | Adjust Time or right-click the function, then click Adjust Time | Adjust Time on the context menu.
  3. The Adjust Time dialog box opens.

    Reference__Dialog_Boxes__Adjust_Time

    Configure options in this dialog box. For more information, see Adjust Time.
  4. Click OK.

Look through examples below. The first figure shows that the most time is spent in the InitializeComponents function.

Studying_Profiling_Results__Adjust_Time__before

The second figure shows what changes if the execution time of this function is adjusted by 50%:

Studying_Profiling_Results__Adjust_Time__after

Pay attention, that dotTrace doesn't show adjusted time for thread nodes in the Threads Tree view. The time for a thread is a sum of work time and idle time, that's why it's not possible to determine exactly how time adjustment affects the time of the thread.

To restore original value for a function
  • Select an adjusted function.
  • Do one of the following:
    • On the menu bar, choose Edit | Adjust Time | Restore Original Value.
    • Right-click the adjusted function, then click Adjust Time | Restore Original Value.
    • Press Ctrl+Shift+Alt+Del.
To restore values for all functions available in the current tab
  • Do one of the following:
    • On the menu bar, choose Edit | Adjust Time | Clear Adjustments Made in Current Tab.
    • Right-click anywhere inside the tab, then click Adjust Time | Clear Adjustments Made in Current Tab.

To clear all adjustments in the current snapshot, open the Overview view and click Clear all adjustments under the Adjusted Functions section.

See Also

Procedures:

Reference: