0

Our web site relies on a number of third party web services. Recently one of these web services suffered a severe slow down causing numerous issues. I want to debug this today(the service is no longer being slow) so I need a way to simulate one of the web services being slow (not all web services but just one particular one).

I know I can simulate a network slow down. How do I simulate one service slowing down?

Community
  • 1
  • 1
Liam
  • 27,717
  • 28
  • 128
  • 190

1 Answers1

5

I managed to do this by altering the Custom rules in fiddler:

enter image description here

If you edit the OnBeforeResponse function thus:

static function OnBeforeResponse(oSession: Session) {
    if (oSession.HostnameIs("www.myhost.com")){
        oSession["response-trickle-delay"] = "400";
    }
    if (m_ShowTimestamp){
        oSession["ui-customcolumn"] = DateTime.Now.ToString("H:mm:ss.ffff") + " " + oSession["ui-customcolumn"]; 
    }

    if (m_ShowTTLB){
        oSession["ui-customcolumn"] = oSession.oResponse.iTTLB + "ms " + oSession["ui-customcolumn"]; 
    }

    if (m_Hide304s && oSession.responseCode == 304){
        oSession["ui-hide"] = "true";
    }
}

The important bit being:

if (oSession.HostnameIs("www.myhost.com")){
     oSession["response-trickle-delay"] = "400";
}

The 400 value is 400ms per KB downloaded (my web service has a loonnngg timeout)

with help from Performance Testing on telerik web site and FiddlerScript CookBook

Liam
  • 27,717
  • 28
  • 128
  • 190
  • 1
    Alternatively, create an AutoResponder rule with match text of `www.myhost.com` and an action of `*flag:response-trickle-delay=400`. – EricLaw May 20 '14 at 19:19
  • Hey @EricLaw, Happy to have another answer if there is another/better way to do this? – Liam May 23 '14 at 10:14