我需要对以参数作为输入的REST API进行基准测试。我想知道是否有一种方法可以使用wrk
。现在我没有看到这样一个选项:有没有办法使用wrk将参数传递给GET请求?
[email protected]:~/wrk$ ./wrk
Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open
-d, --duration <T> Duration of test
-t, --threads <N> Number of threads to use
-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
--latency Print latency statistics
--timeout <T> Socket/request timeout
-v, --version Print version details
当我看到这个文件:https://github.com/wg/wrk/blob/master/src/wrk.lua
我没有看到params
任何地方使用。 params
wrk
回购也没有产生任何有用的东西。
我错过了什么吗?
[Googling](https://www.google.com/search?q=“wrk”+ POST + with + JSON)适用于我。在它所带来的翻版中,[this](http://riteshkrmodi.blogspot.ru/2014/08/running-wrk.html)似乎恰好描述了你所追求的内容。 – kostix
@kostix,感谢您的回答,但我没有在那里看到我的答案。您建议的示例涉及POST,它使用BODY,我想使用GET和PARAMS。 – Akavall