|
Build and Run
Build the program and make sure there is no error.
If you encounter the error for the not found Sub Main, do the following steps. Invoke the project property page.
In the Application page of the project property, change the Startup object: to Sub Main. Re-build your project. |
Next, run the program without debugging.
The following show a sample console output. This program needs to be run at the command prompt with desired options/switches.
Next, run the program at the command prompt. In this sample run, we are using the following arguments:
%\FastGetVB\FastGetVB\bin\Debug>fastgetvb -c 5 -n 8 -u http://www.reactos.org/en/dev.html
The following screenshot shows the sample console output.
A complete output sample for the previous run reproduced below.
C:\networkdotnetproject\FastGetVB\FastGetVB\bin\Debug>fastgetvb -c 5 -n 8 -u http://www.reactos.org/en/dev.html
appArguments(i+1) is: 5
The start counting in ms is: 3072984.
Start getting the page...
In GetPages()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
ResponseCallback()
ReadCallBack()
ReadCallBack()
[trimmed]
ReadCallBack()
ReadCallBack()
The end counting in ms is: 3086453.
The total time elapsed in ms is: 13469.
The total KB in the elapsed time (second) is: 9.
The elapsed time in seconds is: 13.469 seconds.
The number of request in elapsed time is: 0.593956492686911 requests per second.
It is 9 KB per second lor!
C:\networkdotnetproject\FastGetVB\FastGetVB\bin\Debug>
You may want to increase the –n and –c options (or lower those values), re-run the program and notice and compare the outputs.
To answer a question from many students on how to enable the line number for the Visual Studio editor so that it is easier to troubleshoot the code in the Debug mode, please invoke the Visual Studio Options page.
|
|
We can enable the line number for all the languages in Visual Studio by selecting the Line Numbers setting under the Display group check box as shown in the following screenshot.
We can also limit the line number display for certain languages only as shown in the following screenshots for Visual Basic .NET, C# and C++.
The following screenshot shows the Visual Studio editor with line number enabled.
< VB .NET Web Class Performance Measurement Program Example | Main | C++/CLI Web Class Performance Measurement Program Example >