因此,提琴手食譜列出了通過添加上下文菜單獲取每個會話的計時信息的方式。 It's the last sample code block under performance-testing here.使用提琴手以毫秒爲單位獲得會話時間
public static ContextAction("CopyTimers")
function CopyTimers(oSessions: Fiddler.Session[]){
if (null == oSessions){
MessageBox.Show("Please select sessions to copy timers for.", "Nothing to Do");
return;
}
var s: System.Text.StringBuilder = new System.Text.StringBuilder();
for (var x = 0; x < oSessions.Length; x++) {
s.AppendFormat("{0}, {1}, {2}, {3}, {4}, {5}, {6}\r\n",
oSessions[x].Timers.ClientConnected,
oSessions[x].Timers.ClientDoneRequest,
//oSessions[x].Timers.ServerConnected,
oSessions[x].Timers.ServerGotRequest,
oSessions[x].Timers.ServerBeginResponse,
oSessions[x].Timers.ServerDoneResponse,
oSessions[x].Timers.ClientBeginResponse,
oSessions[x].Timers.ClientDoneResponse
);
}
Utilities.CopyToClipboard(s.ToString());
MessageBox.Show("Done.");
}
注意我不得不註釋掉線之一,因爲劇本沒有出現,否則編譯。 (因此不得不將參數的數量更改爲AppendFormat)
不幸的是,這隻能讓時間倒數第二次。我如何在毫秒級別獲得時間?我在哪裏可以找到有關Fiddler腳本可用對象的一般信息?
在此先感謝。
如果您遇到該腳本的編譯錯誤,您正在運行過時的Fiddler版本。升級到當前的。 – EricLaw