开发者

Which way should I follow for the load test in .Net?

I saw a few ways for load test. However reall开发者_Python百科y I'm confused about it! Because my story is :

I collect datas from a web service, and I serialize them to give somewhere. Someone wants to calculate avarage time of my code(from collect data to serialize them) for 100 or 150 users. These users can access my code same time asynchronously. So I want to make specific load test just in my code. Which way should I follow? Multithread? ThreadPool? PerformanceCounter? in C#


Anywhich way, really.

On non-tech: I'm detecting a bit of 'them against me/us' there; perhaps you can get 'them' to help you specify/build it?

More often than not, in these type of scenarios, it is better to keep the test drivers external, because

  • you are testing real code, not test-specific interfaces
  • you can distribute load across machines (even different types of clients)
  • it is often easier to monitor the activity (using PerfMon, WMI, Process Explorer, bandwidth monitoring etc.)
  • it can take a bit of complexity out of your system (by not requiring testing infra structure)

Most of this comes down to preferring integration test over unit test when doing stress tests. The other part comes from the UNIX filosofy: let each program do a single task well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜