如何在 autobench 中设置我正在测试 HTTPS
(端口 443
)URL?
当我调用它时:
autobench --single_host --host1 host.com --port1 443 --uri1 /hello --num_conn 1000 --timeout 5 --low_rate 10 --high_rate 50 --rate_step 10 --num_call 10 --quiet --file results.tsv
它显示:
httperf.parse_status_line: invalid status line `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'!!
httperf.parse_status_line: bad status 1
这是不正确的,因为 HTTPS
页面(在上面的示例中是 https://host.com/hello
)返回有效的 200 OK
响应。
谢谢
最佳答案
您需要将以下行添加到您的 ~/.autobench.conf
文件中:
httperf_ssl = NULL
--ssl
是 httperf
的命令行参数,autobench 在下面调用它。 NULL
值表示不将该 arg 的值传递给 httperf
。
一般来说,您可以将任何额外的命令行参数添加到 httperf
,方法是将它们放在配置文件中并在它们前面加上 httperf_
。另一个例子:
httperf_add-header = "Authorization: Basic Zm9vOmJhcg=="
相当于运行httperf --add-header "Authorization: Basic Zm9vOmJhcg=="
关于ssl - HTTPS 端点上的自动基准,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8109630/