Git Product home page Git Product logo

wrkit's Introduction

wrkit

Staff for wrk benchmarking tool.

学习 wrk 这个压力测试工具时的一些记录。

运行

把自己练手用的lua扩展,打包进docker容器里运行。用了 https://github.com/czerasz/docker-wrk-json 的现成环境,感谢!之所以用这个Docker容器版,是因为自己写的某个lua插件,用到了cjson库,容器版里一并打包进去,就不用单独再安装了。如果是独立的wrk,还需要通过luarocks安装一下cjson($ luarocks install lua-cjson)。

容器版wrk及插件脚本的使用:

# 创建自己的镜像
$ docker build -t="0n100/wrkit" .

# 最基本的运行命令,更详细的wrk参数请参见原版的文档:
$ docker run -it --rm 0n100/wrkit -c5 -d10s -t2 http://$WEB:$PORT

# 测试form-urlencoded编码方式的POST
$ docker run -it -v $(pwd)/lua:/lua --rm 0n100/wrkit -c5 -d10s -t2 -s /lua/post.lua http://$WEB:$PORT

# 测试把多个url写在urls.txt列表里,然后顺序按列表url访问,并统计响应码的数量
$ docker run -it -v $(pwd)/lua:/lua --rm 0n100/wrkit -c5 -d10s -t2 -s /lua/urlist_get.lua http://$WEB:$PORT

# 测试json格式的提交
$ docker run -it -v $(pwd)/lua:/lua --rm 0n100/wrkit -c5 -d10s -t2 -s /lua/post_json.lua http://$WEB:$PORT

# 测试提前产生一堆需要的请求示例
$ docker run -it -v $(pwd)/lua:/lua --rm 0n100/wrkit -c5 -d10s -t2 -s /lua/init_requests.lua http://$WEB:$PORT

资料

wrkit's People

Contributors

0n10n avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.