On Mon, Oct 4, 2010 at 5:28 PM, Matthew Paul Thomas <[email protected]> wrote:
> Well then, here's a simple task to start with: We should have a single
> graph showing, for every application installed by default in Ubuntu over
> the past six months, how long that application took each day to show a
> non-splash-screen window after a cold launch.
>
> How *would* someone automate that?

I'd use a script similar to the following:

#!/bin/bash
time_start() {
echo 3 > /proc/sys/vm/drop_caches
PROGRAM_NAME=$1
WINDOW_TITLE=$2
echo "$1" "$2"
"$PROGRAM_NAME" &  # Start foobar
while ! wmctrl -R "$WINDOW_TITLE"  # Attempt to raise window
do
  sleep 0.05
done
wmctrl -c "$WINDOW_TITLE"  # Close window
}

time time_start firefox Firefox
time time_start oowriter "OpenOffice.org Writer"
...

-- 
John C. McCabe-Dansted

-- 
ubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reply via email to