Forecast Performance
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
Select a function.
Do one of the following:
From the menu bar, choose
.Right-click the function, then click Adjust Time | Optimize Current Instance in the context menu.
Press Del.
To reduce the execution time of all function calls to zero
Select a function.
Do one of the following:
From the menu bar, choose
.Right-click the function, then click Adjust Time | Optimize All Instances in 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.
To adjust execution time of a function or class
Choose a function you want to examine.
From the menu bar, choose Adjust Time | Adjust Time in the context menu.
or right-click the function, then clickThe Adjust Time dialog opens.
Configure options in this dialog. For more information, refer to Adjust Time.
Click OK.
Look through examples below. The first figure shows that the most time is spent in the InitializeComponents
function.
The second figure shows what changes if the execution time of this function is adjusted by 50%:
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:
From the menu bar, choose
.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:
From the menu bar, choose
.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.