Using Homebrew on Mac OS X:
brew install jq
Add these aliases to your profile (e.g., ~/.zshrc, ~/.bashrc, ~/.profile, etc.):
alias getUrls='pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == \"GET\")|.request.url] | .[]")'
alias getUrlsTime='pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == \"GET\")|.request.url,\"blocked :\"+(.timings.blocked|tostring),\"wait: \" + (.timings.wait|tostring), \"receive: \" + (.timings.receive|tostring)] | .[]")'
alias getUrlsTimeMD=' pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == \"GET\")| [\"\",(.request.url|split(\"/noah/\")|.[1]),(.timings.blocked|floor|tostring),(.timings.wait|floor|tostring),(.timings.receive|floor|tostring),\"\"]|join(\"|\")]| .[]")'
alias getUrlsTimeCSV=' pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == \"GET\")| [(.request.url|split(\"/noah/\")|.[1]),(.timings.blocked|floor),(.timings.wait|floor),(.timings.receive|floor)]]| .[] | @csv")'
- Open the Chrome Developer Tools (
Command+Option+i) - Click the Network tab
- Reload the page (
Command+r) - In the Network tab, hover over any area in the table that is not a link (e.g., the Status column)
- Right click (
Control+click) to open the context menu and click Copy All as HAR - Open your favourite command-line interface (e.g., Terminal)
- Enter
getUrlsto print the URLs orgetUrlsTimeto also print timing data orgetUrlsTimeMDto produce a markdown-table orgetURLsTimeCSVto produce a CSV output