Home
> Uncategorized > Performance test a url (vb.net)
Performance test a url (vb.net)
Sometimes, you might want to see the effect of load on the responsiveness on a server. In my case, I wanted to see how video processing slowed down the web server. So, I wrote a console app in vb.net that called a url every second, and recorded the response time. This, I then outputted to a CSV, and imported to google sheets for further processing.
Sub Main(ByVal sArgs() As String)
Dim wc As New WebClient()
Dim strUrl As String = sArgs(0)
Dim dtStart As DateTime
Dim dtEnd As DateTime
Do
dtStart = DateTime.Now
wc.DownloadString(strUrl)
dtEnd = DateTime.Now
Console.WriteLine(dtEnd & “,” & (dtEnd – dtStart).Milliseconds)
Thread.Sleep(1000)
LoopEnd Sub
Categories: Uncategorized
Comments (0)
Trackbacks (0)
Leave a comment
Trackback