0

I have a web performance test that logs into a website. Once the test is complete the results table in VS displays a total time column. I have generated the code and would like to get this total time value programmatically. How do I achieve this?

This is not a duplicate to "how can I tell how long a function has been running?". I can do this.

When you run a web performance test the results are displayed and there is a column titled total time. I want to get this total time programmatically. I am assuming there is a variable somewhere that I can get this value from. I hope this helps.

Albert Muniz
  • 83
  • 1
  • 1
  • 6

1 Answers1

1

Possible Duplicate:
How do I measure how long a function is running?

You achieve this with the System.Diagnostics.Stopwatch class :

var watch = System.Diagnostics.Stopwatch.StartNew();
// the code that you want to measure comes here
watch.Stop();
var elapsedMs = watch.ElapsedMilliseconds;

Source : Calculate the execution time of a method

CBinet
  • 187
  • 2
  • 12