~ubuntuone-support/+junk/syncdaemon-perftest

« back to all changes in this revision

Viewing changes to syncdaemon-perftest-run.sh

  • Committer: Roman Yepishev
  • Date: 2012-04-02 10:28:38 UTC
  • Revision ID: roman.yepishev@canonical.com-20120402102838-cftyw8c8754a1rrj
Latest version of the scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
export PYTHONPATH=$PWD/lib:.
24
24
export PATH=$PWD/bin:$PATH
25
25
 
26
 
RESET_U1_SCRIPT=/tmp/sdperftest-reset.u1
27
 
 
28
26
TYPE=$1
29
27
 
30
28
[ -z "$TYPE" ] && TYPE="meta"
51
49
 
52
50
    # Launch SD in new environment
53
51
    (
54
 
 
55
 
        cat > $RESET_U1_SCRIPT <<EOF
56
 
login $oauth
57
 
cd "~/Ubuntu One"
58
 
delete syncdaemon-perftest-tmp
59
 
EOF
60
 
 
61
 
        $PWD/bin/ubuntuone-rest-files-client.py \
62
 
            -f $RESET_U1_SCRIPT >/dev/null 2>&1
63
 
 
64
52
        # Run our own dbus session
65
53
        eval `dbus-launch`
66
54
        export DBUS_SESSION_BUS_ADDRESS
72
60
        if [ "$TYPE" = "meta" ]; then
73
61
            OPTIONS="--file-count=200 --file-size=0 --track-queues"
74
62
        fi
 
63
        if [ "$TYPE" = "mixed" ]; then
 
64
            OPTIONS="--file-count=200 --file-size=..1048576 --track-speed --track-queues"
 
65
        fi
75
66
 
76
67
        # Syncdaemon will be autostarted
77
68
        python syncdaemon-perftest.py \
79
70
            --graph-prefix="$STATSD_PREFIX.$shard_id" \
80
71
            $OPTIONS \
81
72
            --statsd $STATSD_HOST:$STATSD_PORT \
 
73
            --oauth "$oauth" \
82
74
            --timeout=$((8 * 60)) # 8 minutes
83
75
 
84
76
        kill $DBUS_SESSION_BUS_PID