~ubuntu-branches/ubuntu/utopic/byobu/utopic

« back to all changes in this revision

Viewing changes to usr/share/byobu/tests/byobu-time-notifications

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2010-01-11 22:54:36 UTC
  • mto: This revision was merged to the branch mainline in revision 49.
  • Revision ID: james.westby@ubuntu.com-20100111225436-csnrc41k0bewth1e
Tags: upstream-2.47
ImportĀ upstreamĀ versionĀ 2.47

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
#    byobu-time-notifications: performance testing of byobu's status scripts
 
4
#
 
5
#    Copyright (C) 2009 Canonical Ltd.
 
6
#
 
7
#    Authors: Dustin Kirkland <kirkland@canonical.com>
 
8
#
 
9
#    This program is free software: you can redistribute it and/or modify
 
10
#    it under the terms of the GNU General Public License as published by
 
11
#    the Free Software Foundation, version 3 of the License.
 
12
#
 
13
#    This program is distributed in the hope that it will be useful,
 
14
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
#    GNU General Public License for more details.
 
17
#
 
18
#    You should have received a copy of the GNU General Public License
 
19
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 
 
21
 
 
22
PKG=byobu
 
23
RUNS=100
 
24
 
 
25
loop() {
 
26
        for j in $(seq 1 $RUNS); do
 
27
                /usr/lib/$PKG/$1 >/dev/null
 
28
        done
 
29
}
 
30
 
 
31
TIMEFORMAT="%R"
 
32
if [ -n "$1" ]; then
 
33
        list="$1"
 
34
else
 
35
        list=$(ls /usr/lib/$PKG/)
 
36
fi
 
37
for i in $list; do
 
38
        freq=`grep "byobu-status $i" /usr/share/$PKG/profiles/common | awk '{print $3}'`
 
39
        echo -n "$i $freq "
 
40
        time loop $i
 
41
done