Perfconfig.sh
- Configuration script for Elizabeth Chak's Firefox Performance Testing project
- Seneca College, Toronto Canada. 2006.
- Authored by Dean William Woodside. Email: dwwoodsi@learn.senecac.on.ca
- Editted by Elizabeth Chak. Email: elchak@learn.senecac.on.ca
- This work is public domain. Use at your own peril.
- This script anticipates that you have visual studio installed.
- This script may be changed to suit your needs in configuring the performance testing framework
- The aim of this script is to automate the tedious tasks of manually configuring the framework
- !/bin/bash
echo "Configuration script for Python Firefox Performance Testing project started..."; echo "Using $PWD/prereqs as a staging area.";
- Downloading and installed the required prerequisites to run this framework
- A directory is made to put all the installation files in one place
mkdir prereqs; cd prereqs; SFMIRRORS=(heanet jaist ovh switch mesh belnet umn superb-west surfnet nchc superb-east optusnet kent puzzle easynews ufpr); MIRROR=${SFMIRRORS[$(($RANDOM%16))]}; MIRRORURL=http://${MIRROR}.dl.sourceforge.net/sourceforge;
- wget --spider to check that a mirror is available
echo "Downloading prerequisites from SourceForge mirror: ${MIRROR}";
- The urls below are links to the following framework prerequisties and may be changed if any of the urls are inactive. The
- aim of this automation is to save some of your time in downoading each prerequisite one-by-one (manually) to
- save you some time:
- - Python 2.4
- The scripts all run from Python 2.4. You will need the windows version (not the cygwin version).
- - Python Win32 Extensions
- These extensions provide some support for process management and performance monitoring.
- - Numerical Python
- This is required by Matplotlib.
- - Matplotlib
- This library is used to plot the graphs of performance characteristics of Firefox during the page load test.
- - PySyc
- This is used for reading/writing config files in YAML.
- Developer's comments:
- what about -U agent-string ? "Mozilla"
wget -nv -t 3 --waitretry=120 "http://www.python.org/ftp/python/2.4/python-2.4.msi"; wget -nv -t 3 --waitretry=120 "${MIRRORURL}/pywin32/pywin32-208.win32-py2.4.exe"; wget -nv -t 3 --waitretry=120 "${MIRRORURL}/numpy/Numeric-24.2.win32-py2.4.exe"; wget -nv -t 3 --waitretry=120 "${MIRRORURL}/matplotlib/matplotlib-0.87.3.win32-py2.4.exe"; wget -nv -t 3 --waitretry=120 "http://pyyaml.org/download/pysyck/PySyck-0.61.2.win32-py2.4.exe"; chmod u+x *;
echo "Files downloaded. Now installing.";
- Executing the downloaded prerequisites to start installation
msiexec /quiet /i python-2.4.msi;
- this is where perl-libwin32 would come in handy...
./pywin32-208.win32-py2.4.exe; ./Numeric-24.2.win32-py2.4.exe; ./matplotlib-0.87.3.win32-py2.4.exe; ./PySyck-0.61.2.win32-py2.4.exe;
echo "Downloading the Performance Testing Framework [yorku.ca]"; mkdir /cygdrive/c/mozilla; cd /cygdrive/c/mozilla;
- This is where you insert the zip url for performance testing
wget -nv -t 3 --waitretry=120 "http://www.yorku.ca/abel/liz/mozilla/Win32PerfTesting_v4.zip"; unzip -q Win32PerfTesting_v4.zip; cd /cygdrive/c/mozilla/testing/performance/win32;
- set permissions (otherwise access is denied)
chmod u+rwx *;
echo "Creating config info file.";
- you may change the following (config.yaml) to suit the performance testing you are running
- Note: indentation sensitive; please use this indentation format as a guideline
echo "
# Filename will be appended to the timestamp in the report filename. # Use letters and underscores only filename: Firefox Performance Testing # The title of the report title: Testing Merits # Name of profile to test Test profile 1: # Path to Firefox to test # Please check that the path is directed to the location of the Firefox you want to use for this testing firefox: C:\Program Files\Mozilla Firefox\firefox.exe # Preferences to set in the test # If you don't have preferences to set, use: # preferences: {} preferences: javascript.options.showInConsole : true xpinstall.enabled : true
# Extensions to install in test # Make sure that the path is directed to the desired location of the extension # If you don't have extensions to set, use: # extensions: {} extensions: {} # Make sure that the path is directed to the desired location of the extension # Need quotes around guid because of curly braces" > config.yaml;
- creates the directory that the generated firefox performance reports will go into
- even if the extension_perf_reports exist, it will still attempt to make the reports directory
mkdir /cygdrive/c/mozilla/testing/performance/win32/extension_perf_reports;
echo "Running the performance tests."; ./run_tests.py config.yaml;