configure cwindlines 18 D; bA main { scrollcommand +MAX wid=-2; echo "==============================================================================="; echo " "; echo " We will run the test for several seconds to ensure that sample data"; echo "is collected. This script will modify each of the volatile variables"; echo "so that the program will exit. The main function will be run for" echo "approximately four seconds, and main2 will be run for approximately" echo "two seconds."; echo " "; echo " After the program terminates, the Profile window will indicate that"; echo "profile information was collected."; echo " "; echo " To Continue, click 'Go on Selected Items (F5)'."; echo " "; } bA main##END { scrollcommand +MAX wid=-2; echo "==============================================================================="; echo " "; echo " The 'Files', and 'Functions' tabs contain the profiling reports."; echo "Select the 'Functions' tab to see the percentage of time spent in each " echo "function. By selecting a function in the Profile window, you can see "; echo "how much time was spent on each source line (if source information is "; echo "available), and the time is also displayed in the source pane."; echo " "; resume } bA main##BEGIN { resume; echo "==============================================================================="; echo " "; echo "Running main for four seconds, please wait..."; python -s "import time; time.sleep(4); self_dbw.RunCmd('mute on'); self_dbw.RunCmd('halt; cb main##BEGIN; mute off; eval x = 1; c;', block=False)"; } bA main2##BEGIN { resume; echo "==============================================================================="; echo " "; echo "Running main2 for two seconds, please wait..."; python -s "import time; time.sleep(2); self_dbw.RunCmd('mute on'); self_dbw.RunCmd('halt; cb main2##BEGIN; mute off; eval x = 1; c;', block=False)" } clear; echo " "; echo "This example program will demonstrate some of MULTI's performance profiling"; echo "tools. Performance profiling allows you to view the run-time "; echo "characteristics of your application. This information is available in a"; echo "variety of reports and in the source pane."; echo " "; echo "Let's start by opening the Profile window. If you are not already connected"; echo "to a target you will be prompted to connect." echo " "; profile; if(_REMOTE_CONNECTED == 0) { connect; } if(_REMOTE_CONNECTED == 0) { echo "==============================================================================="; echo "NO TARGET CONNECTED!!!" echo "==============================================================================="; echo "You must connect to the target before profiling can be enabled. This"; echo "script will now exit."; echo " "; echo "You can restart this script by issuing the 'debug' command."; break; } profile start; echo "The Profile window should now be open. You can open it at any time by"; echo "selecting 'Profile...' in the View menu or using the 'profile' command."; echo " "; echo "To continue, click 'Go on Selected Items (F5)'."; echo " ";