Skip to content

Commit

Permalink
qa: 1506 (new) + archive (new) for derived metric rate() counter wrap…
Browse files Browse the repository at this point in the history
… fix

This completes the work for
#1921
  • Loading branch information
kmcdonell committed Apr 4, 2024
1 parent 482cbdc commit 6bf8b78
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 1 deletion.
46 changes: 46 additions & 0 deletions qa/1506
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh
# PCP QA Test No. 1506
# derived metric issue with rate() and counters going
# backwards ... see
# https://github.com/performancecopilot/pcp/issues/1921
#
# Copyright (c) 2024 Ken McDonell. All Rights Reserved.
#
# This test uses the archives/buggy_archive that was attached
# to the github issue, and this archive is:
# Copyright (c) 2024 Oracle. All Rights Reserved.
#

if [ $# -eq 0 ]
then
seq=`basename $0`
echo "QA output created by $seq"
else
# use $seq from caller, unless not set
[ -n "$seq" ] || seq=`basename $0`
echo "QA output created by `basename $0` $*"
fi

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

$sudo rm -rf $tmp $tmp.* $seq.full

_cleanup()
{
cd $here
$sudo rm -rf $tmp $tmp.*
}

status=0 # success is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15

# real QA test starts here
unset PCP_DERIVED_CONFIG

pmval -z -t 5 -f 4 -a archives/buggy_archive disk.dev.util 2>&1

# success, all done
exit
52 changes: 52 additions & 0 deletions qa/1506.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
QA output created by 1506
Note: timezone set to local timezone of host "jyoder-ol8-3" from archive

metric: disk.dev.util
archive: archives/buggy_archive
host: jyoder-ol8-3
start: Sat Aug 26 19:04:00 2023
end: Sat Aug 26 19:05:58 2023
semantics: instantaneous value
units: none
samples: 24
interval: 5.00 sec
19:04:00.955 No values available

sda sdb
19:04:05.955 0.0800 0.0000
19:04:10.955 0.0800 0.0000
19:04:15.955 0.3400 0.0000
19:04:20.955 0.3600 0.0000
19:04:25.955 ? 0.0000
19:04:30.955 No values available

sda sdb
19:04:35.955 ? 0.0000
19:04:40.955 No values available

sda sdb
19:04:45.955 ? 0.0000
19:04:50.955 ? 0.0000
19:04:55.955 No values available

sda sdb
19:05:00.955 ? 0.0000
19:05:05.955 No values available

sda sdb
19:05:10.955 ? 0.0000
19:05:15.955 ? 0.0000
19:05:20.955 No values available

sda sdb
19:05:25.955 ? 0.0000
19:05:30.955 No values available

sda sdb
19:05:35.955 ? 0.0000
19:05:40.955 ? 0.0000
19:05:45.955 No values available

sda sdb
19:05:50.955 40.0800 0.0000
19:05:55.955 94.4200 0.0000
Binary file added qa/archives/buggy_archive.0
Binary file not shown.
Binary file added qa/archives/buggy_archive.index
Binary file not shown.
Binary file added qa/archives/buggy_archive.meta
Binary file not shown.
2 changes: 1 addition & 1 deletion qa/group
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ x11
1503 pcp pidstat ps python local
1504 pmval archive archive_v3 local multi-archive
1505 pmcheck local
1506:reserved pmval derive local
1506 pmval derive local
1511 pmcd local pmda.sample
1515 pmda.denki local valgrind
1530 pmda.zfs local valgrind
Expand Down

0 comments on commit 6bf8b78

Please sign in to comment.