开发者

Can WF be used for load testing

I have a web service that I would like to load test by sending multiple requests to it in parallel. It occurred to me that WF might prove a useful tool to orchestrate that with the flexibility to quickly modify the load/flow and capture timing information in a visible and repeatable way (that's why WF is good, right?). From my reading to date, it appears that despite being called Parallel and ParallelFor, neither activity will run the enclosed activities in parallel but will run them serially on a single thread and wait for all enclosed activities to complete. If a parallel activity blocks it can then be persisted and execution will continue with the next parallel activity.

This SO question/answer suggests that if an AsyncCodeActivity is used (i.e. where I might call out to a web service), then

an AsyncCodeActivity always creates a no persist block for the duration of the activity’s execution. This prevents the workflow runtime from persisting the workflow instance in the middle of the asynchronous work, and also prevents the workflow instance from unloading while the asynchronou开发者_JAVA百科s code is executing.

Which is clearly not what I want either. So how can I use WF to make multiple parallel requests to a webservice or is this a SPRH (square peg round hole)?


I've found Ron Jacob's posts on WF4 and parallelism. It looks like the above information is only partially correct. Ron's sample project has some useful test cases including ParallelAsyncWorkflowApplication with comment Because WorkflowApplication is used the activities will run on random threads as assigned by the CLR thread pool.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜