webbench源码分析之usage函数

来源:互联网 发布:2013office软件下载 编辑:程序博客网 时间:2024/06/06 14:21
/************** 
  程序使用方法 

 ***************/  

让我们先来看一下fprintf函数:
函数原型:int fprintf(FILE *stream, const char *format, ...);
函数描述:fprintf() write  output  to  the  given  output  stream; 


static void usage(void)
{
//int fprintf(FILE *stream, const char *format, ...);
fprintf(stderr,  
   "webbench [option]... URL\n"  
   "  -f|--force               Don't wait for reply from server.\n"  
   "  -r|--reload              Send reload request - Pragma: no-cache.发送重新加载请求\n"  
   "  -t|--time <sec>          Run benchmark for <sec> seconds. Default 30.以秒为基准运行基准测试。默认30\n"  
   "  -p|--proxy <server:port> Use proxy server for request.使用代理服务器请求\n"  
   "  -c|--clients <n>         Run <n> HTTP clients at once. Default one.马上运行HTTP客户端。默认的一个\n"  
   "  -9|--http09              Use HTTP/0.9 style requests.\n"  
   "  -1|--http10              Use HTTP/1.0 protocol.\n"  
   "  -2|--http11              Use HTTP/1.1 protocol.\n"  
   "  --get                    Use GET request method.\n"  
   "  --head                   Use HEAD request method.\n"  
   "  --options                Use OPTIONS request method.\n"  
   "  --trace                  Use TRACE request method.\n"  
   "  -?|-h|--help             This information.\n"  
   "  -V|--version             Display program version.\n"  
);

};

更多精彩,请点击:http://blog.csdn.net/weixin_37977062?viewmode=contents

原创粉丝点击