Created
July 31, 2016 16:35
-
-
Save Leechael/1c7f4205b237a8482e055b9fd685e750 to your computer and use it in GitHub Desktop.
Poorman's mitmproxy based request timing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import time | |
def start(context): | |
context.log("Format: [send data timing] [waitting timing] [receive data timing] Request URL") | |
def request(context, flow): | |
context.started_at = time() | |
def response(context, flow): | |
sending = flow.request.timestamp_end - flow.request.timestamp_start | |
receive = flow.response.timestamp_end - flow.response.timestamp_start | |
waitting = time() - context.started_at - receive | |
context.log("[%.4fs] [%.4fs] [%.4fs] %s%s" % (sending, waitting, receive, flow.request.host, flow.request.path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment