Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Testing jpapdpstatistics_enginestats

There is a dependency between pdpstatistics and jpapdpstatistics_enginestats

Here is some sample table data extracted during the apex-pdp test:

MariaDB [policyadmin]> select * from pdpstatistics;
+--------------+-----------------+-------------------+-----------------------+--------------------------+---------------------+-------------------------+----------------------------+---------------------+---------------------+-------------------------------------------+---------+-------------------------+----------------------------+-----+
| PDPGROUPNAME | PDPSUBGROUPNAME | POLICYDEPLOYCOUNT | POLICYDEPLOYFAILCOUNT | POLICYDEPLOYSUCCESSCOUNT | POLICYEXECUTEDCOUNT | POLICYEXECUTEDFAILCOUNT | POLICYEXECUTEDSUCCESSCOUNT | POLICYUNDEPLOYCOUNT | timeStamp | name | version | POLICYUNDEPLOYFAILCOUNT | POLICYUNDEPLOYSUCCESSCOUNT | ID |
+--------------+-----------------+-------------------+-----------------------+--------------------------+---------------------+-------------------------+----------------------------+---------------------+---------------------+-------------------------------------------+---------+-------------------------+----------------------------+-----+
| defaultGroup | apex | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2021-08-25 09:38:15 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 | 0 | 0 | 1 |
| defaultGroup | apex | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2021-08-25 09:38:31 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 | 0 | 0 | 101 |
| defaultGroup | apex | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2021-08-25 09:38:33 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 | 0 | 0 | 151 |
| defaultGroup | apex | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 2021-08-25 09:38:53 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 | 0 | 0 | 201 |
| defaultGroup | apex | 2 | 0 | 2 | 1 | 0 | 1 | 0 | 2021-08-25 09:39:00 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 | 0 | 0 | 301 |
+--------------+-----------------+-------------------+-----------------------+--------------------------+---------------------+-------------------------+----------------------------+---------------------+---------------------+-------------------------------------------+---------+-------------------------+----------------------------+-----+
5 rows in set (0.000 sec)

MariaDB [policyadmin]> select * from jpapdpstatistics_enginestats;
+----------------------+-----------------------+-----------------+-------------------+------------+---------------+-------------------+---------------+--------+------+-------------------------------------------+---------+
| AVERAGEEXECUTIONTIME | ENGINEID | ENGINETIMESTAMP | ENGINEWORKERSTATE | EVENTCOUNT | LASTENTERTIME | LASTEXECUTIONTIME | LASTSTART | UPTIME | ID | name | version |
+----------------------+-----------------------+-----------------+-------------------+------------+---------------+-------------------+---------------+--------+------+-------------------------------------------+---------+
| 0 | MyApexEngine-0:0.0.1 | 1629884311356 | 2 | 0 | 0 | 0 | 1629884311356 | 0 | 101 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-1:0.0.1 | 1629884311585 | 2 | 0 | 0 | 0 | 1629884311585 | 0 | 101 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-2:0.0.1 | 1629884311734 | 2 | 0 | 0 | 0 | 1629884311734 | 0 | 101 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-3:0.0.1 | 1629884311849 | 2 | 0 | 0 | 0 | 1629884311849 | 0 | 101 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-0:0.0.1 | 1629884311356 | 2 | 0 | 0 | 0 | 1629884311356 | 0 | 151 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-1:0.0.1 | 1629884311585 | 2 | 0 | 0 | 0 | 1629884311585 | 0 | 151 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-2:0.0.1 | 1629884311734 | 2 | 0 | 0 | 0 | 1629884311734 | 0 | 151 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-3:0.0.1 | 1629884311849 | 2 | 0 | 0 | 0 | 1629884311849 | 0 | 151 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 313 | MyApexEngine-0:0.0.1 | 1629884319361 | 2 | 1 | 0 | 313 | 1629884311356 | 8005 | 201 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-1:0.0.1 | 1629884311585 | 2 | 0 | 0 | 0 | 1629884311585 | 0 | 201 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-2:0.0.1 | 1629884311734 | 2 | 0 | 0 | 0 | 1629884311734 | 0 | 201 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-3:0.0.1 | 1629884311849 | 2 | 0 | 0 | 0 | 1629884311849 | 0 | 201 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 313 | MyApexEngine-0:0.0.1 | 1629884319361 | 2 | 1 | 0 | 313 | 1629884311356 | 8005 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-1:0.0.1 | 1629884311585 | 2 | 0 | 0 | 0 | 1629884311585 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-2:0.0.1 | 1629884311734 | 2 | 0 | 0 | 0 | 1629884311734 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | MyApexEngine-3:0.0.1 | 1629884311849 | 2 | 0 | 0 | 0 | 1629884311849 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | NSOApexEngine-0:0.0.1 | 1629884339193 | 2 | 0 | 0 | 0 | 1629884339193 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | NSOApexEngine-1:0.0.1 | 1629884339229 | 2 | 0 | 0 | 0 | 1629884339229 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | NSOApexEngine-2:0.0.1 | 1629884339263 | 2 | 0 | 0 | 0 | 1629884339263 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
| 0 | NSOApexEngine-3:0.0.1 | 1629884339304 | 2 | 0 | 0 | 0 | 1629884339304 | 0 | 301 | apex-86512ba9-afc9-4a0f-bb45-0aba0d330ffb | 0.0.0 |
+----------------------+-----------------------+-----------------+-------------------+------------+---------------+-------------------+---------------+--------+------+-------------------------------------------+---------+
20 rows in set (0.000 sec)


jpapdpstatistics_enginestats records need to be updated whenever there is a change to the pdpstatistics PK.

Here is the data extracted during our tests (9 +10 above):


MariaDB [policyadmin]> select * from jpapdpstatistics_enginestats;
+----------------------+-------------+-----------------+-------------------+------------+---------------+-------------------+-----------+--------+---------------------+-------+---------+
| AVERAGEEXECUTIONTIME | ENGINEID | ENGINETIMESTAMP | ENGINEWORKERSTATE | EVENTCOUNT | LASTENTERTIME | LASTEXECUTIONTIME | LASTSTART | UPTIME | timeStamp | name | version |
+----------------------+-------------+-----------------+-------------------+------------+---------------+-------------------+-----------+--------+---------------------+-------+---------+
| 100 | Test-Engine | 20210825120846 | 2 | 5 | 0 | 0 | 9999 | 8888 | 2021-08-25 12:08:46 | test1 | 1.0 |
| 100 | Test-Engine | 20210825120847 | 2 | 5 | 0 | 0 | 9999 | 8888 | 2021-08-25 12:08:47 | test1 | 1.0 |
+----------------------+-------------+-----------------+-------------------+------------+---------------+-------------------+-----------+--------+---------------------+-------+---------+
2 rows in set (0.000 sec)

...