diff --git a/test/performance-test/artillery/config.yaml b/test/performance-test/config.yaml similarity index 100% rename from test/performance-test/artillery/config.yaml rename to test/performance-test/config.yaml diff --git a/test/performance-test/loadtest/test.js b/test/performance-test/loadtest/test.js deleted file mode 100644 index bdc5497a8..000000000 --- a/test/performance-test/loadtest/test.js +++ /dev/null @@ -1,58 +0,0 @@ -const loadtest = require('loadtest'); - -function statusCallback(error, result, latency) { - //console.log('Current latency %j, result %j, error %j', latency, result, error); - console.log('----'); - console.log('Current result %j', result); - console.log('----'); - //console.log('Request elapsed milliseconds: ', result.requestElapsed); - //console.log('Request index: ', result.requestIndex); - //console.log('Request loadtest() instance index: ', result.instanceIndex); -} - -// Testnet -const url = 'https://explorer.cardano-testnet.iohkdev.io/rosetta' -const networkId = 'testnet' -const blockIndex = 2126713 -const blockHash = 'cc747306d0420500b0e3b2a30c5b799f810f57473ae0c3e365aaf36d2e49cd2a' - -// /block - -const block_payload = -{ - "network_identifier": { - "blockchain": "cardano", - "network": networkId - }, - "block_identifier": { - "index": blockIndex, - "hash": blockHash - } -} - -const options = { - url: url + '/block', - concurrency: 30, - method: 'POST', - contentType: 'application/json', - body: block_payload, - maxRequests: 100, - maxSeconds: 10, - statusCallback: statusCallback -}; - -loadtest.loadTest(options, function(error, result) -{ - if (error) - { - return console.error('Got an error: %s', error); - } - console.log(result); - if (result.totalErrors > 1) - { - console.log('FAIL'); - } else - { - console.log('PASS'); - } -}); diff --git a/test/performance-test/artillery/package-lock.json b/test/performance-test/package-lock.json similarity index 100% rename from test/performance-test/artillery/package-lock.json rename to test/performance-test/package-lock.json diff --git a/test/performance-test/artillery/package.json b/test/performance-test/package.json similarity index 100% rename from test/performance-test/artillery/package.json rename to test/performance-test/package.json diff --git a/test/performance-test/artillery/readme.md b/test/performance-test/readme.md similarity index 67% rename from test/performance-test/artillery/readme.md rename to test/performance-test/readme.md index cd0afe17f..14c740b4f 100644 --- a/test/performance-test/artillery/readme.md +++ b/test/performance-test/readme.md @@ -1,8 +1,5 @@ -``` -____ ____ ____ ____ ____ ___ _ _ _ ____ ____ _ _ -|__/ | | [__ |__| |__/ | | | | |___ |__/ \_/ -| \ |__| ___] | | | \ | | |___ |___ |___ | \ | -``` +Rosetta Load Testing with Artillery + #### Install - `npm i artillery` diff --git a/test/performance-test/artillery/sign-transaction.js b/test/performance-test/sign-transaction.js similarity index 100% rename from test/performance-test/artillery/sign-transaction.js rename to test/performance-test/sign-transaction.js diff --git a/test/performance-test/artillery/tests/construction-simple-transaction.yaml b/test/performance-test/tests/construction-simple-transaction.yaml similarity index 100% rename from test/performance-test/artillery/tests/construction-simple-transaction.yaml rename to test/performance-test/tests/construction-simple-transaction.yaml diff --git a/test/performance-test/artillery/tests/data-block-tests.yaml b/test/performance-test/tests/data-block-tests.yaml similarity index 100% rename from test/performance-test/artillery/tests/data-block-tests.yaml rename to test/performance-test/tests/data-block-tests.yaml diff --git a/test/performance-test/artillery/vars/localhost-vars.csv b/test/performance-test/vars/localhost-vars.csv similarity index 100% rename from test/performance-test/artillery/vars/localhost-vars.csv rename to test/performance-test/vars/localhost-vars.csv diff --git a/test/performance-test/artillery/vars/testnet-vars.csv b/test/performance-test/vars/testnet-vars.csv similarity index 100% rename from test/performance-test/artillery/vars/testnet-vars.csv rename to test/performance-test/vars/testnet-vars.csv