how to measure the page time load?
I want to know how much time a speci开发者_运维问答fic code in my App takes ?!!! Thank you
You could use the Stopwatch class:
var watch = Stopwatch.StartNew();
// Run your code here
watch.Stop();
long milliseconds = watch.ElapsedMilliseconds;
Aside from @Darins answer you won't be able to measure page load time on the client as they are across a network and there are many variables involved (i.e. You can start a javascript timer as the page would need loaded first). However anything on the server can be timed.
精彩评论