pmrep: fix archive end time reporting
[pcp.git] / qa / 166
blob5b325246512d3967e0a107132054d6c6535b4ef1
1 #! /bin/sh
2 # PCP QA Test No. 166
3 # pmlogreduce in the presence of mark records
5 # Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which pmlogreduce >/dev/null 2>&1 || "No pmlogreduce binary installed"
18 _filter()
20 sed -e "s;$tmp;TMP;"
23 status=0 # success is the default!
24 $sudo rm -rf $tmp.*
25 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
27 # real QA test starts here
29 pmlogreduce -A 1m -t 1m tmparch/reduce-gap $tmp
31 echo "--- mark records in input archive ---"
32 pmdumplog -z tmparch/reduce-gap | grep '<mark>'
33 echo "--- mark records in reduced archive ---"
34 pmdumplog -z $tmp | grep '<mark>'
36 for metric in sample.milliseconds sample.drift
38 echo
39 echo "=== $metric ==="
40 echo "--- pmval using input archive ---"
41 pmval -z -A 1m -t 15sec -a tmparch/reduce-gap $metric
42 if [ $metric = sample.milliseconds ]
43 then
44 echo
45 echo "--- raw pmval using input archive ---"
46 pmval -r -f 0 -z -A 1m -t 15sec -a tmparch/reduce-gap $metric
48 echo
49 echo "--- pmval -U using reduced archive ---"
50 pmval -z -U $tmp $metric 2>&1 | _filter
51 if [ $metric = sample.milliseconds ]
52 then
53 echo
54 echo "--- raw pmval -U using reduced archive ---"
55 pmval -r -f 0 -z -U $tmp $metric 2>&1 | _filter
57 echo
58 echo "--- pmval using reduced archive ---"
59 pmval -z -A 1m -t 15sec -a $tmp $metric 2>&1 | _filter
60 if [ $metric = sample.milliseconds ]
61 then
62 echo
63 echo "--- raw pmval using reduced archive ---"
64 pmval -r -f 0 -z -A 1m -t 15sec -a $tmp $metric 2>&1 | _filter
66 done
69 # success, all done
70 exit