WCAT请求限制

时间:2012-11-30 18:00:08

标签: benchmarking throttling wcat

我在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;
    }
}
}

到目前为止,谷歌搜索似乎这不是一个普遍的问题...任何洞察力将非常感激。

1 个答案:

答案 0 :(得分:3)

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