< VB .NET Web Class Performance Measurement Program Example | Main | C++/CLI Web Class Performance Measurement Program Example >

 


 

 

Chapter 14 Part 4:

Network Performance and Scalability

 

 

What do we have in this chapter 14 Part 4?

  1. Build and Run the VB .NET Project

  2. Enabling the Visual Studio Editor Line Numbers

Build and Run

 

Build the program and make sure there is no error.

 

A Simple VB .NET Web Class Performance Measurement Program Example: building the project

 

If you encounter the error for the not found Sub Main, do the following steps. Invoke the project property page.

 

A Simple VB .NET Web Class Performance Measurement Program Example: invoking the project property page

 

In the Application page of the project property, change the Startup object: to Sub Main. Re-build your project.

 

A Simple VB .NET Web Class Performance Measurement Program Example: setting the project Startup object to Sub Main

 

Next, run the program without debugging.

 

A Simple VB .NET Web Class Performance Measurement Program Example: running the project without debugging

 

The following show a sample console output. This program needs to be run at the command prompt with desired options/switches.

 

A Simple VB .NET Web Class Performance Measurement Program Example: a sample of console output

 

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 Simple VB .NET Web Class Performance Measurement Program Example: a console output sample when run at the command prompt

 

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.

 

Enabling the Visual Studio Editor Line Numbers

 

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.

 

Enabling the Visual Studio Editor Line Numbers: invoking 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.

 

Enabling the Visual Studio Editor Line Numbers: enabling the line number for all languages of Visual Studio

 

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++.

 

Enabling the Visual Studio Editor Line Numbers: enabling the line number for VB .NET/Basic only

 

Enabling the Visual Studio Editor Line Numbers: enabling the line number for C# only

 

Enabling the Visual Studio Editor Line Numbers: enabling the line number for C/C++ only

 

The following screenshot shows the Visual Studio editor with line number enabled.

 

Enabling the Visual Studio Editor Line Numbers: the line number seen in the Visual Studio editor

 

 

 


< VB .NET Web Class Performance Measurement Program Example | Main | C++/CLI Web Class Performance Measurement Program Example >