Jump to content

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

From Wikitech

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