JVM调优-CPU占用过高

一. 压测工具AB

安装

  yum -y install httpd-tools

测试 web 项目,接口 http get

  模拟10个并发(100个总请求)

  ab -c 10 -n 100 url

测试 web 项目,接口 http post

  ab -c 10 -n 100 -p 'post.txt' -T 'application/x-www-form-urlencoded' url

    post.txt 请求体 request body

    -T 请求头 request header

 

posted @ 2020-09-20 17:27  Super-Yan  阅读(307)  评论(0编辑  收藏  举报