Open main menu

CDOT Wiki β

Perfconfig.sh

Revision as of 02:28, 14 December 2006 by Elichak (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. Configuration script for Elizabeth Chak's Firefox Performance Testing project
  2. Seneca College, Toronto Canada. 2006.
  3. Authored by Dean William Woodside. Email: dwwoodsi@learn.senecac.on.ca
  4. Editted by Elizabeth Chak. Email: elchak@learn.senecac.on.ca
  5. This work is public domain. Use at your own peril.
  6. This script anticipates that you have visual studio installed.
  7. This script may be changed to suit your needs in configuring the performance testing framework
  8. The aim of this script is to automate the tedious tasks of manually configuring the framework
  9. !/bin/bash

echo "Configuration script for Python Firefox Performance Testing project started..."; echo "Using $PWD/prereqs as a staging area.";

  1. Downloading and installed the required prerequisites to run this framework
  2. 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;

  1. wget --spider to check that a mirror is available

echo "Downloading prerequisites from SourceForge mirror: ${MIRROR}";

  1. The urls below are links to the following framework prerequisties and may be changed if any of the urls are inactive. The
  2. aim of this automation is to save some of your time in downoading each prerequisite one-by-one (manually) to
  3. save you some time:
  4. - Python 2.4
  5. The scripts all run from Python 2.4. You will need the windows version (not the cygwin version).
  6. - Python Win32 Extensions
  7. These extensions provide some support for process management and performance monitoring.
  8. - Numerical Python
  9. This is required by Matplotlib.
  10. - Matplotlib
  11. This library is used to plot the graphs of performance characteristics of Firefox during the page load test.
  12. - PySyc
  13. This is used for reading/writing config files in YAML.
  14. Developer's comments:
  15. 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.";

  1. Executing the downloaded prerequisites to start installation

msiexec /quiet /i python-2.4.msi;

  1. 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;

  1. 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;

  1. set permissions (otherwise access is denied)

chmod u+rwx *;

echo "Creating config info file.";

  1. you may change the following (config.yaml) to suit the performance testing you are running
  2. 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;
   
  1. creates the directory that the generated firefox performance reports will go into
  2. 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;