-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use autocannon for testing self signed certificates #309
Comments
Please post the test config. |
Here is the test script for the same. "use strict"; const autocannon = require("autocannon"); const loadSpec = { // async/await printHeader = true; printHeader = true; printHeader = true; function printRequestSummery(result) { function printResultData( function toCSVFy(result, resultKeys) { |
How is this related to testing a server with self signed certificate? Do you mean that you don't see this error when the same test is run against a different http server? Also, it'd be great help in debugging if you could post a reproducible repo as an example. |
Yes if I run this test code to use http url. I do not see this error. Do you see any obvious mistake in code posted above. I will try to provide some reproducible repo soon. |
@hrishikeshgjoshi i think you can run your tests like this |
I am using autocannon to test WebServer performance and it trows error after test is executed before it provides request status as follows.
http-parser.js:126
throw err;
^
Error: Cannot use a destroyed histogram
at Object.get (/opt/HTTPClient/node_modules/hdr-histogram-js/dist/wasm/index.js:67:15)
at WasmHistogram.recordValue (/opt/HTTPClient/node_modules/hdr-histogram-js/dist/wasm/index.js:141:29)
at Client.onResponse (/opt/HTTPClient/node_modules/autocannon/lib/run.js:298:21)
at Client.emit (events.js:315:20)
at HTTPParser.nextRequest (/opt/HTTPClient/node_modules/http-parser-js/http-parser.js:178:43)
at HTTPParser.Client.parser. (/opt/HTTPClient/node_modules/autocannon/lib/httpClient.js:113:10)
at HTTPParser.BODY_SIZED (/opt/HTTPClient/node_modules/http-parser-js/http-parser.js:434:10)
at HTTPParser.execute (/opt/HTTPClient/node_modules/http-parser-js/http-parser.js:120:27)
at TLSSocket. (/opt/HTTPClient/node_modules/autocannon/lib/httpClient.js:153:17)
The text was updated successfully, but these errors were encountered: