Hi,
- adjust the test config file to be as per man page
(output unchanged as cmd line opts override these)
- some additional output testing, revealed a P3 bug
introduced in 19237bb, fix sent off-list already
- archives/sample-secs has timezone :Australia/Melbourne,
not sure where that : comes from, and current tools
create archives with timezones like EET-2
- some additional unit conversion tests
- un/interpolated archive tests
- we should now have very good pmrep coverage in QA
---
qa/1069 | 26 +++++++++++++++++++++---
qa/1069.out | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+), 3 deletions(-)
diff --git a/qa/1069 b/qa/1069
index f3d212e..6c31f3f 100755
--- a/qa/1069
+++ b/qa/1069
@@ -29,6 +29,7 @@ _live_filter()
}
log="--archive $here/archives/sample-secs -z"
+log2="--archive $here/archives/20130706 -z -O30m"
# real QA test starts here
echo "== basic live mode reporting"
@@ -42,14 +43,27 @@ pmrep -z -p -s 5 -t 2 -P 2 --archive
$here/archives/sample-secs \
echo "== basic configuration file handling"
echo > $tmp.config <<EOF
-secs = sample.seconds
-msecs = sample.milliseconds
+[options]
+version = 1
+source = www.example.com
+samples = 1
+interval = 1
EOF
pmrep -s 5 -t 2 $log -c $tmp.config sample
+echo "== exercise various output options "
+pmrep -s 5 -t 2 $log -c $tmp.config -o stdout -p -w 20 sample
+echo "---"
+pmrep -s 5 -t 2 $log -c $tmp.config -C -x sample
+echo "---"
+pmrep -s 5 -t 2 $log -c $tmp.config -G -H -U sample
+
echo "== exercise raw counter mode "
pmrep -s 5 -t 2 $log -c $tmp.config -r sample
+echo "== exercise timezone setting "
+pmrep -s 5 -t 2 --archive $here/archives/sample-secs -p -Z UTC sample
+
echo "== exercise CSV and alternate delimiters"
pmrep -s 5 -t 2 $log -c $tmp.config -o csv -p -P 1 sample
pmrep -s 5 -t 2 $log -c $tmp.config -o csv --delimiter '|' sample | \
@@ -63,7 +77,9 @@ echo "== exercise repeated headers option"
pmrep -s 5 -t 2 $log -E 2 sample.seconds
echo "== exercise units conversion options"
-pmrep -s 5 -t 2 $log -p -y microsec sample
+pmrep -s 5 -t 2 $log2 -p -b MB -P 0 mem.util.free mem.util.used
+pmrep -s 5 -t 2 $log2 -p -q "count x 10^-2" -P 0 -w 15 disk.dev.read
+pmrep -s 5 -t 2 $log -p -y microsec sample
echo "== derived metrics configuration file"
cat > $tmp.derived <<EOF
@@ -94,6 +110,10 @@ echo 'version = 99' >> $tmp.vconfig
cat $tmp.config >> $tmp.vconfig
pmrep -s 5 -t 2 $log -c $tmp.vconfig sample
+echo "== un/interpolated archive mode reporting"
+pmrep -s 5 -t 2 $log2 -p mem.util.free
+pmrep -s 5 -t 2 $log2 -p -u mem.util.free
+
# success, all done
echo "== done"
status=0
diff --git a/qa/1069.out b/qa/1069.out
index 81714e1..a93e788 100644
--- a/qa/1069.out
+++ b/qa/1069.out
@@ -26,6 +26,34 @@ Interval can't be less than 1 second.
1.000 1.000
1.000 1.000
1.000 1.000
+== exercise various output options
+ s.seconds s.milliseconds
+ util util
+20:36:45 N/A N/A
+20:36:47 N/A N/A
+20:36:49 1.000 1.000
+20:36:51 1.000 1.000
+20:36:53 1.000 1.000
+---
+
+ archive: /tmp/pcp/var/lib/pcp/testsuite/archives/sample-secs
+ host: rattle
+ timezone: :Australia/Melbourne (creation, current is EET-2.0)
+ start: Mon May 1 13:36:45 2000
+ end: Mon May 1 13:36:53 2000
+ metrics: 2
+ samples: 5
+ interval: 2.0 sec
+ duration: 8 sec
+
+ s.seconds s.milliseconds
+ util util
+---
+ N/A N/A
+ N/A N/A
+ 1.000 1.000
+ 1.000 1.000
+ 1.000 1.000
== exercise raw counter mode
s.seconds s.milliseconds
sec millisec
@@ -34,6 +62,14 @@ Interval can't be less than 1 second.
380436 380435679.381
380438 380437679.382
380440 380439679.413
+== exercise timezone setting
+ s.seconds s.milliseconds
+ util util
+10:36:45 N/A N/A
+10:36:47 N/A N/A
+10:36:49 1.000 1.000
+10:36:51 1.000 1.000
+10:36:53 1.000 1.000
== exercise CSV and alternate delimiters
Time,sample.seconds,sample.milliseconds
2000-05-01 20:36:45,N/A,N/A
@@ -62,6 +98,21 @@ ok
util
1.000
== exercise units conversion options
+ m.u.free m.u.used
+ MB MB
+00:47:01 37 5926
+00:47:03 37 5926
+00:47:05 37 5926
+00:47:07 37 5926
+00:47:09 37 5926
+ d.d.read d.d.read d.d.read d.d.read
d.d.read d.d.read
+ sda sdb sdc hdc
sdd sde
+ count x 10^-2/s count x 10^-2/s count x 10^-2/s count x 10^-2/s
count x 10^-2/s count x 10^-2/s
+00:47:01 N/A N/A N/A N/A
N/A N/A
+00:47:03 0 3000 50 0
0 100
+00:47:05 0 3000 0 0
0 100
+00:47:07 0 3000 50 0
0 100
+00:47:09 0 3000 50 0
0 50
s.seconds s.milliseconds
util util
20:36:45 N/A N/A
@@ -103,4 +154,19 @@ ok
1.000 1.000
== exercise bad config version
Incompatible configuration file version (read v99, need v1).
+== un/interpolated archive mode reporting
+ m.u.free
+ Kbyte
+00:47:01 38220
+00:47:03 38220
+00:47:05 38220
+00:47:07 38220
+00:47:09 38220
+ m.u.free
+ Kbyte
+00:48:01 36832
+00:49:01 38236
+00:50:01 37932
+00:51:01 37836
+00:52:01 38744
== done
Thanks,
--
Marko Myllynen
|