2014_03_20周四工作日志:不错的调试代码1
来源:互联网 发布:资金盘源码 编辑:程序博客网 时间:2024/05/09 19:21
主要是对所占内存的设置,执行1000次,看看是所占的内存大小为多少。
运用到实际;
void main(){char cGet='\n';do {if (cGet=='\n'){printf("\n");printf("Robert:MultiThreadTest>>Please Select>>\n");printf("1:\tSingle Thread Runs Task 6 Times\n");printf("2:\tEach Thread Runs Task 1 Times Using 6 Threads\n");printf("3:\tExit\n");}cGet=getchar();if(cGet=='1'){TestSingleThread();continue;}else if(cGet=='2'){TestMultiThread();continue;}else if(cGet=='3'){break;}else{continue;}} while(TRUE);return;}
运用到实际:
void maintest()//将原来的main改为{CHttpClient client;string url="http://192.168.0.116/lanyun/?option=ajax2&a=plan_result&type=1&nologin=1";//string post="type=3&mac=10:00:00:00:00:00&name=111";string psend;client.SetDebug(FALSE);int a=client.Post(url,post,psend);printf("结果是:%s\n\n",psend.c_str());return;}void main(){char cGet='\n';do {if (cGet=='\n'){printf("\n\n");printf("Robert:>>Please Select>>\n");printf("1:\tmaintest\n");printf("2:\tmaintest\n");printf("3:\tExit\n\n");}cGet=getchar();if(cGet=='1'){for(int i=0;i<1000;i++){maintest();}continue;}else if(cGet=='2'){for(int j=0;j<1000;j++){maintest();}continue;}else if(cGet=='3'){break;}else{continue;}} while(TRUE);return;}
运用到实际;
void main(){char cGet='\n';do {if (cGet=='\n'){printf("\n\n");printf("Robert:>>Please Select>>\n");printf("1:\tmaintest\n");printf("2:\tmaintest\n");printf("3:\tExit\n\n");}cGet=getchar();if(cGet=='1'){for(int i=0;i<1000;i++){maintest("192.168.0.116","1","1","type=3&mac=10:00:00:00:00:00&name=111");}continue;}else if(cGet=='2'){for(int j=0;j<1000;j++){maintest("192.168.0.116","1","1","type=3&mac=10:00:00:00:00:00&name=111");}continue;}else if(cGet=='3'){break;}else{continue;}} while(TRUE);return;//maintest("192.168.0.116","1","1","type=3&mac=10:00:00:00:00:00&name=111");}
0 0
- 2014_03_20周四工作日志:不错的调试代码1
- 2014_03_20周四工作日志:
- error:2014_03_20周四工作日志:string类使用错误。
- 2014-03-13周四工作日志
- 2014_03_27周四工作日志:虚拟机使用注意
- 2014_03_21工作日志:不错 的ifdef使用情景
- 《java实习》日志 周四
- 【常用代码】调试日志
- php 日志调试代码
- 我的工作日志1
- 我的工作日志1
- 不错的数据库连接代码
- 不错的JS代码
- 不错的代码
- 2011-12-29【周四】工作
- 不错的vc调试入门
- 工作日志_20120314 WEBLOGIC 调试技巧
- 我的工作日志
- 游绍兴偶感
- ExtJs 4.x 学习小记:隐藏panel的标题栏
- linux下显示桌面和快速切换
- debian 无法使用apt-get解决办法
- climits 中的符号变量
- 2014_03_20周四工作日志:不错的调试代码1
- Exercise 22:目前你学到了些什么?
- TextView的属性
- OpenGL入门学习
- 字符串反转
- 使用mutt+msmtp做linux邮件客户端
- Android实现弹力伸缩式菜单
- hadoop集群搭建(一)——单机版配置
- 小布老师-PL_SQL(第十讲)