From b0e1529f4995ef661ba06bd1c5ee59556682b583 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Tue, 4 Feb 2020 11:30:07 +0000 Subject: [PATCH 01/11] Pass timeoutDelay arg to Clinic Doctor --- bin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin.js b/bin.js index 731b3b6a..62d296e2 100755 --- a/bin.js +++ b/bin.js @@ -485,6 +485,7 @@ async function runTool (args, Tool, version, uiOptions) { const openLocalFile = args.open && !args.upload const tool = new Tool({ + timeoutDelay: parseInt(args.t, 10), sampleInterval: parseInt(args['sample-interval'], 10), detectPort: !!onPort, dest: args.dest, From c709e651070f7d939d842b443263782ac78c6eea Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Fri, 7 Feb 2020 14:07:40 +0000 Subject: [PATCH 02/11] Update -t arg to --on-timeout --- bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin.js b/bin.js index 62d296e2..67ec50df 100755 --- a/bin.js +++ b/bin.js @@ -485,7 +485,7 @@ async function runTool (args, Tool, version, uiOptions) { const openLocalFile = args.open && !args.upload const tool = new Tool({ - timeoutDelay: parseInt(args.t, 10), + timeoutDelay: parseInt(args['on-timeout'], 10), sampleInterval: parseInt(args['sample-interval'], 10), detectPort: !!onPort, dest: args.dest, From 946cb35b694c2275da48ffbc911fa0f36bdb68ff Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Tue, 11 Feb 2020 17:14:34 +0000 Subject: [PATCH 03/11] Change timeout parameter to collectDelay --- bin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin.js b/bin.js index 67ec50df..fc1036a2 100755 --- a/bin.js +++ b/bin.js @@ -351,7 +351,7 @@ const result = commist() })) .register('flame', catchify(async function (argv) { const version = require('@nearform/flame/version') - checkArgs(argv, 'clinic-bubbleprof', version) + checkArgs(argv, 'clinic-flame', version) const args = subarg(argv, { alias: { @@ -485,7 +485,7 @@ async function runTool (args, Tool, version, uiOptions) { const openLocalFile = args.open && !args.upload const tool = new Tool({ - timeoutDelay: parseInt(args['on-timeout'], 10), + collectDelay: parseInt(args['on-timeout'], 10), sampleInterval: parseInt(args['sample-interval'], 10), detectPort: !!onPort, dest: args.dest, From 006c015ce2dd3a88e30f797699ed294bfa31ed8a Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Wed, 12 Feb 2020 16:14:35 +0000 Subject: [PATCH 04/11] Validate usage of the on-port flag --- bin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin.js b/bin.js index fc1036a2..b1a91701 100755 --- a/bin.js +++ b/bin.js @@ -481,6 +481,11 @@ async function runTool (args, Tool, version, uiOptions) { console.log('To generate the report press: Ctrl + C') } } + // Validate usage of on-port flag + if(args['on-port']>0 && onPort) { + console.log('You must provide on-port with the autocannon config') + process.exit(0) + } const openLocalFile = args.open && !args.upload From c7aa0baa3bb28c1a2b80ef1aa9526da871077799 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Wed, 12 Feb 2020 16:26:35 +0000 Subject: [PATCH 05/11] Run linter --- bin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin.js b/bin.js index b1a91701..f7fb64fe 100755 --- a/bin.js +++ b/bin.js @@ -481,8 +481,9 @@ async function runTool (args, Tool, version, uiOptions) { console.log('To generate the report press: Ctrl + C') } } + // Validate usage of on-port flag - if(args['on-port']>0 && onPort) { + if (args['on-port'] > 0 && onPort) { console.log('You must provide on-port with the autocannon config') process.exit(0) } From 13efc8f3795fc816a40cebf25f17da17771d5932 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Tue, 18 Feb 2020 10:37:54 +0000 Subject: [PATCH 06/11] Update path for collect_timeout_feature branches --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dbce8b11..8aec5a3e 100644 --- a/package.json +++ b/package.json @@ -10,17 +10,17 @@ "clinic": "./bin.js" }, "scripts": { - "test": "standard | snazzy && tap -j1 --timeout 0 --no-cov test/*.test.js", - "test-local": "standard | snazzy && tap -j1 --timeout 0 --no-cov test/*.test.js test-local/*.test.js", + "test": "standard | snazzy && tap -j4 --timeout 0 --no-cov test/*.test.js", + "test-local": "standard | snazzy && tap -j4 --timeout 0 --no-cov test/*.test.js test-local/*.test.js", "ci-lint": "standard | snazzy", - "ci-test-no-cov": "tap -j1 --timeout 0 --no-cov test/*.test.js", - "ci-test-cov": "tap -j1 --timeout 0 test/*.test.js", + "ci-test-no-cov": "tap -j4 --timeout 0 --no-cov test/*.test.js", + "ci-test-cov": "tap -j4 --timeout 0 test/*.test.js", "lint": "standard --fix | snazzy" }, "dependencies": { - "@nearform/bubbleprof": "^3.0.0", - "@nearform/doctor": "^4.1.0", - "@nearform/flame": "^5.0.0", + "@nearform/bubbleprof": "nearform/node-clinic-bubbleprof#collect_timeout_feature", + "@nearform/doctor": "nearform/node-clinic-doctor#collect_timeout_feature", + "@nearform/flame": "nearform/node-clinic-flame#collect_timeout_feature", "any-shell-escape": "^0.1.1", "async": "^3.0.1", "autocannon": "^4.0.0", From 2f9ec3ee5b3c8a1ea80c1072f0971a8073c86176 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Tue, 18 Feb 2020 11:20:54 +0000 Subject: [PATCH 07/11] Update arg to match collect-delay in 0x --- bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin.js b/bin.js index f7fb64fe..55f46e96 100755 --- a/bin.js +++ b/bin.js @@ -491,7 +491,7 @@ async function runTool (args, Tool, version, uiOptions) { const openLocalFile = args.open && !args.upload const tool = new Tool({ - collectDelay: parseInt(args['on-timeout'], 10), + collectDelay: parseInt(args['collect-delay'], 10), sampleInterval: parseInt(args['sample-interval'], 10), detectPort: !!onPort, dest: args.dest, From feeae8a18afde37e205ea73948acb827ed4e7523 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Wed, 19 Feb 2020 16:08:38 +0000 Subject: [PATCH 08/11] Add the collect-delay flag --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d529e952..14daab73 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ clinic ask --help -h | --help Display Help -v | --version Display Version --collect-only Do not process data on termination +--collect-delay Specify a delay(ms) before collecting data. --visualize-only datapath Build or rebuild visualization from data --on-port Run a script when the server starts listening on a port. --autocannon Run the autocannon benchmarking tool when the server starts listening on a port. From dc8702a86312aaf701f8d9df8a55359c551d50fb Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Fri, 21 Feb 2020 11:25:28 +0000 Subject: [PATCH 09/11] Update docs with collect-delay arg --- docs/clinic-doctor.txt | 1 + docs/clinic-flame.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/clinic-doctor.txt b/docs/clinic-doctor.txt index 730eb30b..dd603898 100644 --- a/docs/clinic-doctor.txt +++ b/docs/clinic-doctor.txt @@ -38,6 +38,7 @@ -h | --help Display Help -v | --version Display Version --collect-only Do not process data on termination + --collect-delay Specify a delay(ms) before collecting data --visualize-only datapath Build or rebuild visualization from data --sample-interval interval Sample interval in milliseconds --on-port Run a script when the server starts listening on a port. diff --git a/docs/clinic-flame.txt b/docs/clinic-flame.txt index 86955fd8..32594fc3 100644 --- a/docs/clinic-flame.txt +++ b/docs/clinic-flame.txt @@ -40,6 +40,7 @@ -h | --help Display Help -v | --version Display Version --collect-only Do not process data on termination + --collect-delay Specify a delay(ms) before collecting data --visualize-only datapath Build or rebuild visualization from data --on-port Run a script when the server starts listening on a port. --autocannon Run the autocannon benchmarking tool when the server starts listening on a port. From 63bffe6eba7870ac7134917fc5422535d37201b0 Mon Sep 17 00:00:00 2001 From: Dylan Coakley Date: Tue, 25 Feb 2020 14:56:15 +0000 Subject: [PATCH 10/11] Add DS_Store to the ignore list --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 61061d9a..a1d48933 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,5 @@ typings/ .vscode # IntelliJ Idea .idea +# Mac OS +.DS_Store From 46c0c9870b6bd34a49c41aa8adb566b2ee8acdb9 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 20 Mar 2020 16:09:42 +0000 Subject: [PATCH 11/11] Bubbleprof doesn't have a matching branch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8aec5a3e..e618817c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "lint": "standard --fix | snazzy" }, "dependencies": { - "@nearform/bubbleprof": "nearform/node-clinic-bubbleprof#collect_timeout_feature", + "@nearform/bubbleprof": "^3.0.0", "@nearform/doctor": "nearform/node-clinic-doctor#collect_timeout_feature", "@nearform/flame": "nearform/node-clinic-flame#collect_timeout_feature", "any-shell-escape": "^0.1.1",