点击菜单栏Rules->CustomRules然后按Ctrl+F搜索 static function Main() 即可看到如下内容,粘贴规则:
// The Main() function runs everytime your FiddlerScript compiles
static function Main() {
var today: Date = new Date();
FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today;
//显示请求的目标IP地址,复制下面这行贴上
FiddlerObject.UI.lvSessions.AddBoundColumn("ServerIP", 120, "X-HostIP");
点击菜单栏Rules->CustomRules然后按Ctrl+F搜索 class Handlers{ 即可看到如下的内容,继续粘贴规则:
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;
}
//添加响应时间结束