Nick
Nick

Reputation: 636

Need to record the time taken for the following requests?

I am performing WCF service testing here using a small C# .net test client. How do i record the time taken for the following items : -

  1. Transmission time for the response.
  2. Time taken for De-Serialization of data.

How do i get these times using a WCF service proxy in .net ?

Any other way ( cant use Soap UI and fiddler due to admin policy issues here) would be highly appreciated.

Upvotes: 0

Views: 269

Answers (3)

VolleyBall Player
VolleyBall Player

Reputation: 710

I would recommend you to take a look at

http://miniprofiler.com/

I have used it in a production website and it does wonders for me.

Upvotes: 1

Oded
Oded

Reputation: 499132

You can try the new benchmarking framework benchmarque from Chris Patterson:

What is Benchmarque?

Benchmarque (pronounced bench-mar-key) allows you to create comparative benchmarks using .NET. An example of a comparative benchmark would be evaluating two or more approaches to performing an operation, such as whether for(), foreach(), or LINQ is faster at enumerating an array of items. While this example often falls into the over-optimization category, there are many related algorithms that may warrant comparison when cycles matter.

Upvotes: 0

Mare Infinitus
Mare Infinitus

Reputation: 8192

The ultimate fallback is Stopwatch, this will at least work for the deserialisation.

var stopWatch = new Stopwatch();

stopWatch.Start();

// you call here

stopWatch.Stop();

var time = stopWatch.ElapsedTicks;

Upvotes: 0

Related Questions