如何在 jmeter 中触发德鲁伊查询

how to fire druid query in jmeter

我想使用 jmeter 触发德鲁伊查询。例如:

curl -L -H'Content-Type: application/json' -XPOST --data-binary @querypath/filename.json hostname @x.x.x.x:8082/druid/v2/?pretty

这里 filename.json 是我的任何德鲁伊查询。

如何将上述druid curl命令查询与jmeter集成?

提前致谢。

HTTP(S) Test Script Recorder

记录一下
  1. 准备 JMeter 进行记录。最简单的方法是通过 JMeter Templates 功能

    • 从 JMeter 主菜单中选择 File -> Templates -> Recording 并单击 "Create"
    • 展开 HTTP(S) 测试脚本记录器并单击 "Start"
  2. filename.json 复制到 JMeter 安装的 "bin" 文件夹
  3. 执行你的 curl query through JMeter proxy 比如:

    curl -x http://localhost:8888 -L -H'Content-Type: application/json' -XPOST --data-binary @querypath/filename.json hostname @x.x.x.x:8082/druid/v2/?pretty
    
  4. 就是这样,JMeter 将存储相关的 HTTP Request under the Recording Controller. You will be able to replay it and see the output in the View Results Tree 侦听器。