ストレステストツール(WebLoad)とコードのタイマーの結果と大きな違いがあります 遅れて、Asp.netストレステスト - 欠けている時間はどこですか?
どこに欠けていますか?
ネットワーク待機時間? (重負荷ではない:最大負荷サイズ80分17分、他のトラフィックなし)
IIS?
どのようにギャップを測定できますか? 1ページ( "上陸")のための
結果:
のWebLOAD平均結果= 3.1秒 - のWebLOADタイマー "着陸" = 0.05秒の後ろ
コード - リクエストを開始します - >終了要求。
単純なブラウザ要求= 0.5秒
背後にあるコード:
protected void Application_BeginRequest(object sender, EventArgs e)
{
Stopwatch RequestTimer = new Stopwatch();
RequestTimer.Start();
HttpContext.Current.Items["RequestTimer"] = RequestTimer;
}
protected void Application_EndRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Items["RequestTimer"] != null)
{
Stopwatch RequestTimer = (Stopwatch)HttpContext.Current.Items["RequestTimer"];
RequestTimer.Stop();
Logger.SectionEnd("RequestTimer", RequestTimer, "", true); //Per Page Name
}
}
AのWebLOADコードの一部:.NET 4で実行
wlGlobals.GetFrames = false
wlHttp.Header["Host"] = host
wlHttp.Header["Proxy-Connection"] = "off"
wlHttp.Header["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7"
wlHttp.Header["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,\x2A/\x2A;q=0.8"
//wlHttp.Header["Accept-Encoding"] = "gzip,deflate,sdch"
wlHttp.Header["Accept-Language"] = "en-GB,en-US;q=0.8,en;q=0.6"
wlHttp.Header["Accept-Charset"] = "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
SetTimer ("Landing")
wlHttp.Get(url)
SendTimer ("Landing")
IIS7。
おかげ
テストを実行しているときに、ブラウザでリクエストを行い、同様の結果が得られました。レイテンシの大半はIISレベルにあると私は考えています。 – SirMoreno