Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/frmscoe/postman into event-d…
Browse files Browse the repository at this point in the history
…irector
  • Loading branch information
JeanPierreNell committed May 31, 2024
2 parents 75e26bb + e0ff943 commit 83fb2e3
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 84 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

images/.$time-stamp-time-line.svg.bkp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"info": {
"_postman_id": "14667efe-18de-42ac-84ea-d889baffc9c2",
"_postman_id": "46f61e7a-d7a6-42bd-bba4-5ce9a77c4195",
"name": "1.1. Rule-901 End-to-End test - pain001/013 disabled",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "25521465"
"_exporter_id": "29185806"
},
"item": [
{
Expand Down Expand Up @@ -613,6 +613,7 @@
"script": {
"exec": [
"const resJson = pm.response.json();\r",
"\r",
"const rulesPerTypologyCount = [1];\r",
"const totalExpectedTypologies = 1;\r",
"const expectedAlertStatus = \"NALT\";\r",
Expand All @@ -629,14 +630,14 @@
" \"999\"\r",
"];\r",
"const ruleDescriptions = {\r",
" \"001\": \"Derived account age - creditor\",\r",
" \"002\": \"Transaction convergence - debtor\",\r",
" \"003\": \"Account dormancy - creditor\",\r",
" \"004\": \"Account dormancy - debtor\",\r",
" \"006\": \"Outgoing transfer similarity - amounts\",\r",
" \"007\": \"Outgoing transfer similarity - descriptions\",\r",
" \"001\": \"Derived account age - creditor\",\r",
" \"002\": \"Transaction convergence - debtor\",\r",
" \"003\": \"Account dormancy - creditor\",\r",
" \"004\": \"Account dormancy - debtor\",\r",
" \"006\": \"Outgoing transfer similarity - amounts\",\r",
" \"007\": \"Outgoing transfer similarity - descriptions\",\r",
" \"008\": \"Outgoing transfer similarity - creditor\",\r",
" \"010\": \"Increased account activity: volume - debtor\",\r",
" \"010\": \"Increased account activity: volume - debtor\",\r",
" \"011\": \"Increased account activity: volume - creditor\",\r",
" \"016\": \"Transaction convergence - creditor\",\r",
" \"017\": \"Transaction divergence - debtor\",\r",
Expand Down Expand Up @@ -706,15 +707,14 @@
"let fastestTypology = 999999999;\r",
"let totalRule = 0;\r",
"let totalTypology = 0;\r",
"let pcrgTmDP = resJson.result[0].report.metaData.prcgTmDP;\r",
"let pcrgTmEventDirector = resJson.result[0].report.metaData.prcgTmEventDirector;\r",
"let cadpTime = resJson.result[0].report.tadpResult.channelResult[0].prcgTm;\r",
"let prcgTmDP = resJson.result[0].report.metaData.prcgTmDP;\r",
"let prcgTmED = resJson.result[0].report.metaData.prcgTmED;\r",
"let tadpTime = resJson.result[0].report.tadpResult.prcgTm;\r",
"let whichTypologyIsSlowest = 0;\r",
"let whichTypologyIsFastest = 0;\r",
"let whichRuleIsSlowest = 0;\r",
"\r",
"let typologyTimings = resJson.result[0].report.tadpResult.channelResult[0].typologyResult.filter(e => e.prcgTm > 0);\r",
"let typologyTimings = resJson.result[0].report.tadpResult.typologyResult.filter(e => e.prcgTm > 0);\r",
"\r",
"let timingsPerTypology = `Elapsed typology processor time per typology\r",
"====================================================\r",
Expand All @@ -729,8 +729,8 @@
"typologyTimings = typologyTimings.filter(e => e.prcgTm > 0).map(e => e.prcgTm);\r",
"\r",
"ruleResults = [];\r",
"for (let i = 0; i < resJson.result[0].report.tadpResult.channelResult[0].typologyResult.count(); i++) {\r",
" ruleResultsPerTypology = resJson.result[0].report.tadpResult.channelResult[0].typologyResult[i].ruleResults.filter(e => e.prcgTm > 0);\r",
"for (let i = 0; i < resJson.result[0].report.tadpResult.typologyResult.count(); i++) {\r",
" ruleResultsPerTypology = resJson.result[0].report.tadpResult.typologyResult[i].ruleResults.filter(e => e.prcgTm > 0);\r",
" for (let j = 0; j < ruleResultsPerTypology.count(); j++) {\r",
" ruleResults.push(ruleResultsPerTypology[j]);\r",
" };\r",
Expand Down Expand Up @@ -768,27 +768,27 @@
"whichRuleIsSlowest = ruleResultsUnique.filter(e => e.prcgTm === slowestRule)[0].id;\r",
"whichRuleIsFastest = ruleResultsUnique.filter(e => e.prcgTm === fastestRule)[0].id;\r",
"\r",
"let totalEstimatedTime = pcrgTmDP + pcrgTmEventDirector + slowestRule + slowestTypology + cadpTime + tadpTime;\r",
"let totalEstimatedTime = prcgTmDP + prcgTmED + slowestRule + slowestTypology + tadpTime;\r",
"let averageRuleTime = totalRule / ruleCount;\r",
"let averageTypologyTime = totalTypology / typologyCount;\r",
"\r",
"console.log(`====================================================\r",
"Total Estimate Time: ${(totalEstimatedTime/1000000).toFixed(3)}ms;\r",
"====================================================\r",
"Data Preparation Service: ${(pcrgTmDP/1000000).toFixed(3)}ms\r",
"Event-Director: ${(pcrgTmEventDirector/1000000).toFixed(3)}ms\r",
"Data Preparation Service: ${(prcgTmDP/1000000).toFixed(3)}ms\r",
"ED: ${(prcgTmED/1000000).toFixed(3)}ms\r",
"====================================================\r",
"Number of Rules: ${ruleCount}\r",
"Slowest Rule: ${(slowestRule/1000000).toFixed(3)}ms (Rule ${whichRuleIsSlowest})\r",
"Fastest Rule: ${(fastestRule/1000000).toFixed(3)}ms (Rule ${whichRuleIsFastest})\r",
"Rule Average: ${(averageRuleTime/1000000).toFixed(3)}ms\r",
"====================================================\r",
"Number of Typologies: ${typologyCount}\r",
"Slowest Typology: ${(slowestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.channelResult[0].typologyResult[whichTypologyIsSlowest].cfg})\r",
"Fastest Typology: ${(fastestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.channelResult[0].typologyResult[whichTypologyIsFastest].cfg})\r",
"Slowest Typology: ${(slowestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsSlowest].cfg})\r",
"Fastest Typology: ${(fastestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsFastest].cfg})\r",
"\r",
"Typology Average: ${(averageTypologyTime/1000000).toFixed(3)}ms\r",
"====================================================\r",
"CADP: ${(cadpTime/1000000).toFixed(3)}ms\r",
"TADP: ${(tadpTime/1000000).toFixed(3)}ms\r",
"====================================================`);\r",
"\r",
Expand Down Expand Up @@ -854,12 +854,12 @@
" pm.expect(totalEstimatedTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Data preparation procesing time: ${(pcrgTmDP / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(pcrgTmDP).to.be.greaterThan(0);\r",
"pm.test(`Data preparation procesing time: ${(prcgTmDP / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(prcgTmDP).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Event-Director procesing time: ${(pcrgTmEventDirector / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(pcrgTmEventDirector).to.be.greaterThan(0);\r",
"pm.test(`ED procesing time: ${(prcgTmED / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(prcgTmED).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Slowest rule procesing time: ${(slowestRule / 1000000).toFixed(3)} milliseconds (Rule ${whichRuleIsSlowest})`, function () {\r",
Expand All @@ -874,22 +874,18 @@
" pm.expect(averageRuleTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Slowest typology processing time: ${(slowestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.channelResult[0].typologyResult[whichTypologyIsSlowest].id})`, function () {\r",
"pm.test(`Slowest typology processing time: ${(slowestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsSlowest].id})`, function () {\r",
" pm.expect(slowestTypology).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Fastest typology processing time: ${(fastestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.channelResult[0].typologyResult[whichTypologyIsFastest].id})`, function () {\r",
"pm.test(`Fastest typology processing time: ${(fastestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsFastest].id})`, function () {\r",
" pm.expect(fastestTypology).to.be.lessThan(999999999);\r",
"});\r",
"\r",
"pm.test(`Average typology processing time: ${(averageTypologyTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(averageTypologyTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`CADProc processing time: ${(cadpTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(cadpTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`TADProc processing time: ${(tadpTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(tadpTime).to.be.greaterThan(0);\r",
"});\r",
Expand All @@ -898,7 +894,7 @@
" pm.expect(resJson.result[0].report.status).to.equal(expectedAlertStatus);\r",
"});\r",
"\r",
"let sortedTypologiesById = resJson.result[0].report.tadpResult.channelResult[0].typologyResult.sort((e1, e2) => (e1.cfg > e2.cfg) ? 1 : (e1.cfg < e2.cfg) ? -1 : 0);\r",
"let sortedTypologiesById = resJson.result[0].report.tadpResult.typologyResult.sort((e1, e2) => (e1.cfg > e2.cfg) ? 1 : (e1.cfg < e2.cfg) ? -1 : 0);\r",
"\r",
"pm.test(`Evaluation result contains ${totalExpectedTypologies} typology results`, function () {\r",
" pm.expect(sortedTypologiesById.length).to.equal(totalExpectedTypologies);\r",
Expand Down
Loading

0 comments on commit 83fb2e3

Please sign in to comment.