Reputation: 6510
I have to performance/load test a bunch of interdependant services. They all use net.tcp and most use duplex contracts and internal queueing. [handrolled POCO queue class using lock(syncRoot) { if(queue.Empty) Thread.Wait(); }]
Here's the approach I've come up with:
Questions:
Upvotes: 2
Views: 1074
Reputation: 6827
Wow...the title was definitely the tip of the iceberg! Hope I'm not way off base here on my responses! :)
performance testing of WCF services can be done many different ways: using test tools such as Microsoft Team Test, Borland Silk Performer, Mercury LoadRunner, or something like LoadGen or a custom test harness. My preference is to try to take the approach that you've done in creating some sort of functional unit test and then feeding data into that test, while using the test tool to spin up multiple concurrent instances of that test (virtual 'users'). The tooling of most commercial test tools really facilitate this type of testing so its difficult to go wrong here. The biggest challenge usually grows out of maintaining the test cases and test data to support testing the application.
WCF doesn't have any built in counters related to performance. Thats actually a blind spot. Sure, you can see how many connections are being made to the server, but this is coarse information and you probably want to know which services are servicing those requests. Rumor is that Microsoft's 'Dublin', as part of providing a rich hosting environment for WCF/WF, will include surfacing performance counters for the hosted service. We will have to wait and see what actually shakes out.
If I needed to instrument a WCF service without impacting the existing codebase I'd look into how much mileage I could get out of a WCF behavior that i could apply to the service. This custom behavior could likely surface the performance counters you might want.
Yes. I would care about results (meaning performance?) of a functional test. The caveat is that there is likely some startup (JIT) which can be ignored. I'd probably look to profile the execution of a functional test to get execution metrics - but i'd not turn on code profiling during a performance run.
For SLA's again custom behaviors might be the answer. You could log operational metrics to a database and then report off that. Commercial products like Amberpoint and SOA Software will provide support for this as well (including performance counters).
Queuing requests to a wcf service? I immediately think of net.msmq binding, especially if your looking to make the request durable.
Upvotes: 1