debugging - 使用 bombardier 进行服务器基准测试 - 但不能添加主体参数

标签 debugging go benchmarking

所以,我正在使用 bombardier在 MacOS Sierra 上 用于从命令行进行服务器基准测试。 在此示例中,我使用 1 个连接和 1 个请求,以及两个 header : “授权”和“内容类型”和正文:“{isTemplate:1}” 但是服务器没有接收到正文。

./bombardier -c 1 -n 1 -m PATCH -H "Authorization: Bearer MYBEARERGOESHERE" -H "Content-Type: application/x-www-form-urlencoded" -b "{isTemplate:1}" http://localhost:8082/presentation/6525/update

我试过:

-b "{isTemplate:1}"

-b "isTemplate:1"

有什么想法吗?

最佳答案

刚刚找到解决方案,- 你需要像这样编写主体变量:

-b "isTemplate=1"

所以最终要求:

./bombardier -c 1 -n 1 -m PATCH -H "Authorization: Bearer MYBEARERGOESHERE" -H "Content-Type: application/x-www-form-urlencoded" -b "isTemplate=1" http://localhost:8082/presentation/6525/update

关于debugging - 使用 bombardier 进行服务器基准测试 - 但不能添加主体参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53082371/

相关文章:

visual-studio - 检查调试器中即将返回的值

Golang 从内存中的二进制数据执行子进程

MongoDB 构建 Docker 镜像时无法运行测试 - 服务器选择错误 : server selection timeout

sql - 运行用户定义的 SQL 脚本的 postgresql pgBench 工具

hadoop - Hadoop2 中的 hadoop-test.jar 在哪里?

javascript - 为什么字符串文字比字符串对象快?

java - 与 JUnit 一起运行时,Intellij IDEA 不会在 Kotlin 断点处停止

javascript - 是什么导致我的 jQuery 调用出现这种递归?

我无法理解的 C 代码中的编译器错误

随机索引分布怪异