#!/bin/bash -xev
#
# Caio Begotti for the Mozilla/Brasil project
# <caio1982@gmail.com> http://www.mozilla.org.br
#
# A very simple script to capture some stats of Mozilla
# and Firefox. Before running this .sh please run
# the beforeinfo.sh script.

# set whether 'mozilla' or 'firefox' as the binary target
TBIN="mozilla"

# exec (5x) the script to measure the startup time
# it's very important to not make any kind of input
for i in $(seq 5); do perl startup-unix.pl ./${TBIN}/${TBIN}; done

# do a stress test opening 40 cached websites
# NOTE: the last window is blank, but save its content.
# The results are in the source of the page.

./${TBIN}/${TBIN} http://axolotl.mozilla.org/page-loader/loader.pl

# it's time for an online test, opening a lot of windows
./${TBIN}/${TBIN} http://www.mozilla.org/xpapps/sidebar/perf/winopen.html

# the same test, but locally... FIXME
./${TBIN}/${TBIN} -chrome "$(pwd)/winopen.xul"
