C#计算程序运行时间
来源:互联网 发布:网络聊天技巧话术 编辑:程序博客网 时间:2024/06/05 20:07
var sw = new Stopwatch(); //使用Stopwatch类计算
sw.Reset(); //重置测量时间
sw.Start(); //开始计算
for (var i = 0; i < 100; i++)
{
ComInput comInput = null;
var agentW = new AgentW();
comInput = ComInput.GetComInput();
comInput.SetPm("field1", Guid.NewGuid().ToString());
comInput.SetPm("field2", Guid.NewGuid().ToString());
agentW.Cmd("BLL.DTS.Affairs.Test.Insert", comInput);
}
sw.Stop(); //终止计算
Response.Write(sw.ElapsedMilliseconds + " ms \t\t");//打印时间
sw.Reset(); //重置测量时间
sw.Start(); //开始计算
for (var i = 0; i < 100; i++)
{
ComInput comInput = null;
var agentW = new AgentW();
comInput = ComInput.GetComInput();
comInput.SetPm("field1", Guid.NewGuid().ToString());
comInput.SetPm("field2", Guid.NewGuid().ToString());
agentW.Cmd("BLL.DTS.Affairs.Test.Insert", comInput);
}
sw.Stop(); //终止计算
Response.Write(sw.ElapsedMilliseconds + " ms \t\t");//打印时间
- C# 计算程序运行时间
- C#计算程序运行时间
- C#计算程序运行时间
- C#计算程序的运行时间
- C#计算一段程序的运行时间
- c#计算程序的运行时间
- C# 计算一段程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 程序运行时间计算
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- 计算程序运行时间
- Linux下android ADT 安装不上的解决
- 实习日记016(8月8日)
- C# 扩展方法
- 如果asp.net页面加载时间过长,怎样在加载时显示提示
- 向老板汇报,如何写好PPT?
- C#计算程序运行时间
- Linux stat函数讲解(获取文件详细信息)
- vmware ubuntu10.04出现 sudo: must be setuid root
- 大型网站系统架构分析
- android源码定制之--入门篇--android源码目录结构
- 数据源详解
- 全国排名前20的一家软件公司的C#面试题
- 最大公约数gcd
- Linux系统整体性能监控工具详解