Jump to content

User:Effie Mouzeli (WMF)/Docs/mwdebug testing

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

When making changes, mwdebug is a lovely host to help you.

#!/bin/bash

#random=$(date +%s)

backend="mwdebug1001.eqiad.wmnet"
urllist="urls.txt"

while IFS= read -r line; do
  $line =~ ^#.*   && continue
  date | tr '\n' ' ' ; curl -H "User-Agent: effie url test/0.01" -H "x-wikimedia-debug: backend=$backend" -o /dev/null -s  -w 'time %{time_total}s %{http_code} %{url_effective}\n' $line
done < $urllist

Sample urls.txt: https://phabricator.wikimedia.org/P11932