简体   繁体   中英

How to find out slow places in a WCF service

We have a standart WCF service for serving clients. It's a regular service with nothing special. There is a task for me to speed up the service. How can I do a monitoring of service slowness? I pretty sure there is the some tools for detecting bottlenecks in any program. I tried to use embed Visual Studio 2010 profiling tool but it's seems so complicated and not obvious for me so I have posted my question here.

I've used WCF Storm in the past to profile and help solve performance issues with WCF services.

You can get a trial version for 15 days or single license for around $100, but it will really help you diagnose your code.

Also check out this question "How to get started with WCF Performance profiling" for some more tips on profiling your services

In your service you could add some properties like StartTime, EndTime that are set at the entry/exit to your Method and transfered back in the object that your are delivering from your WCF and check that the service is actually taking a long time.

I was recently investigating a "slow" WCF that I'd written that was hosted at our provider, and it turned out to be that the methods themselves were lightning fast (using the above), but the initial time for startup of the service varied from 20sec - 2:10 because of some configuration option (that was not available through their remote management tools). Upon contacting the provider, the initial startup (when it has unloaded) reduced to under 3seconds. So you need to check where the slowpoint is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM