gpt4 book ai didi

benchmarking - WCAT 请求限制

转载 作者:行者123 更新时间:2023-12-04 05:21:24 26 4
gpt4 key购买 nike

我在 Windows Server 2008 Std 上对 IIS 7 的 WCAT 6.4 的初始测试/配置遇到了问题。我们对 WCAT 还很陌生,所以这可能是一个相当幼稚的问题。

我们正在测试一个预计不会有大量流量的 Web 应用程序,我正在尝试实现一个 WCAT 场景,在该场景中,我们限制请求数量并逐渐增加吞吐量以对 Web 应用程序进行基准测试。给定的脚本每秒生成大约 500 个请求,我们正在尝试开始时比这更小!

阅读 WCAT 文档,似乎在场景文件中包含“throttle”属性是实现这一目标的正确做法,但是每当我尝试这样做时,我都会收到“收到无效代码”消息。我正在使用 WCAT 附带的预制示例测试脚本的(非常轻微的调整)版本,只要我不包含“throttle ”元素,它们似乎就可以正常工作。 (下面的命令行和“home.ubr”脚本)

通过在命令行语法中包含“-throttlerps”参数,我已经能够对每秒的请求进行一些限制,但是在使场景文件选项工作时仍然存在问题。命令行语法:

<directory>\wcat.wsf -terminate -run -clients localhost -t samples\scripts\home.ubr -f samples\scripts\settings.ubr -s localhost -throttlerps 1

和场景文件:
scenario
{
name = "IIS Home Page";

warmup = 10;
duration = 20;
cooldown = 10;
//throttle = 10; //HERE is what throws an error!

/////////////////////////////////////////////////////////////////
//
// All requests inherit the settings from the default request.
// Defaults are overridden if specified in the request itself.
//
/////////////////////////////////////////////////////////////////
default
{
// send keep-alive header
setheader
{
name = "Connection";
value = "keep-alive";
}

// set the host header
setheader
{
name = "Host";
value = server();
}

// HTTP1.1 request
version = HTTP11;

// keep the connection alive after the request
close = ka;
}

//
// This script is made for IIS7
//
transaction
{
id = "Default Web Site Homepage";
weight = 1;

request
{
url = "/";
statuscode = 200;
}

request
{
url = "/welcome.png";
statuscode = 200;
}

//
// specifically close the connection after both files are requested
//
close
{
method = reset;
}
}

transaction
{
id = "Default Web Site Homepage";
weight = 1;

request
{
url = "/";
statuscode = 200;
}

request
{
url = "/welcome.png";
statuscode = 200;
}

//
// specifically close the connection after both files are requested
//
close
{
method = reset;
}
}
}

到目前为止,谷歌搜索似乎不是一个常见问题......任何见解都将不胜感激。

最佳答案

好的,所以找到了答案:WCAT 的文档有一个错字,给定的文件属性被列为“throttle”,但正确的版本是使用“throttlerps”作为场景文件中的元素名称,而不仅仅是“throttle”(为了镜像命令行语法)。也许其他人会偶然发现这个......

关于benchmarking - WCAT 请求限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13650606/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com