Function JoelTest Response.Write("This is a test.")EndFunc
Here is the code in an ASP.NET Web Form button click:
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start();string baseUri = "http://localhost/wconnect_demo/JoelTest.wwd";for (int i = 0; i < 10; i++) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseUri); request.Method = "GET"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream());string page = reader.ReadToEnd(); reader.Close(); response.Close(); } sw.Stop();this.lblResponse.Text = "Total WC time: " + sw.ElapsedMilliseconds.ToString() + "<br>";
The times for each request were all over the map, so I ran 10 back to back. The average was roughly 200-250ms per request. There are quite a few caveats I realize:
1. This is the demo version.
2. It is a single WC instance.
3. It is operating in file mode.
4. This isn't a raw throughput test. I'm only sending one request at a time.
5. I don't know how much of the time is on the .NET side.
6. This is my desktop development computer, and my hardware is showing its age.
7. It's entirely possible I have something configured wrong.
All things considered, 250ms isn't bad, but I'm wondering if I should expect better. There may be a flaw in my test. I also did a little testing with Microsoft's Stress Tool directly against the WC server. If I pump up the threads, I can get about 55 requests per second. If I use only one thread, it drops to 4-5 requests per second, consistent with my test from ASP.NET. So again, we're not talking about throughput, I'm just trying to get an indication of how long an average individual request takes to process.
EDIT: I just had a thought. I wonder if I'm hitting a file polling interval here. Since I'm only sending one request at a time, WC can only process as fast as the file system updates. If I send multiple requests through the Stress Tool then WC can process more requests/second because it sees more files between intervals. I imagine that issues mostly goes away in COM mode.
Thanks,
Joel