专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
对一个服务器程序想统计每秒可以处理多少数据包,要如何做?答案是用处理数据包的总数,除以累记处理数据包用的时间。这里要指出的是,运行一段程序,使用的cpu时间,跟实际运行的时间是不一样的。附例如下: privatevoidShowRunTime() { TimeSpants1=Process.GetCurrentProcess().TotalProcessorTime; Stopwatchstw=newStopwatch(); stw.Start(); intCircles=1000; for(inti=0;i<Circles;++i) { Console.Wr [阅读全文] [PDF]
1 共1条 分1页