开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜