How to capture the response time and IP address in Fiddler

1. How does Fiddler display the response time?
1) Find Rules->Customize Rules... on the Tool bar (or Ctrl+R shortcut)


2) Add in class Handlers{

function BeginRequestTime(oS: Session)
{
    if (oS.Timers != null)
    {
        return oS.Timers.ClientBeginRequest.ToString();    
    }
    return String.Empty;
}


public static BindUIColumn("Time Taken")
           function CalcTimingCol(oS: Session){
             var sResult = String.Empty;
             if ((oS.Timers.ServerDoneResponse> oS.Timers.ClientDoneRequest))
             {
               sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest) .ToString ();
             }
             return sResult;
           }

3) Save and close the custom rule to see Time Taken

2. How does Fiddler display the IP address?
1) Find Rules->Customize Rules... on the Tool bar (or Ctrl+R shortcut)
2) Ctrl+F to search for "static function main"
3) Add the following line of code to the main function, call the fiddlerUI function, and display the ip address column
FiddlerObject.UI.lvSessions.AddBoundColumn("ServerIP",120,"X-HostIP");


4) Save and close the custom rule, you can see the ip address column ServerIP




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325579172&siteId=291194637