mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-18 15:09:41 +00:00
Using the performNRequests, I collected the following statistics
before choosing the maximum allowed "leaked" memory.
Node.js 0.12.2,
Using the http module ('use-http-instead-of-cors-anywhere'):
Memory usage delta: 132800 (100 requests of 50 kb each, 250ms)
Memory usage delta: 110144 (100 requests of 1 kb each, 172ms)
Memory usage delta: 709936 (1000 requests of 1 kb each, 902ms)
Memory usage delta: 865104 (10000 requests of 1 kb each, 7073ms)
Memory usage delta: 930416 (100000 requests of 1 kb each, 62856ms)
Using CORS Anywhere:
Memory usage delta: 356784 (100 requests of 50 kb each, 1004ms)
Memory usage delta: 355248 (100 requests of 1 kb each, 641ms)
Memory usage delta: 1326856 (1000 requests of 1 kb each, 3338ms)
Memory usage delta: 1462584 (10000 requests of 1 kb each, 21186ms)
Memory usage delta: 1473624 (100000 requests of 1 kb each, 211202ms)
Clearly, there is a small leak, but it is not proportional/linear
in terms of the number of requests, so the observed "leak" is probably
not an issue. Furthermore, the "leak" also occurs with the plain
http module.
After setting fixed limits, I ran the tests on Node.js 0.10.25 and
observed that the tests failed due to the too low limits, so I
incremented the limits (400 -> 550, 1500 -> 2000).
39 lines
911 B
JSON
39 lines
911 B
JSON
{
|
|
"name": "cors-anywhere",
|
|
"version": "0.2.2",
|
|
"description": "CORS Anywhere is a reverse proxy which adds CORS headers to the proxied request. Request URL is taken from the path",
|
|
"license": "MIT",
|
|
"author": "Rob Wu <rob@robwu.nl>",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Rob--W/cors-anywhere.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/Rob--W/cors-anywhere/issues/",
|
|
"email": "rob@robwu.nl"
|
|
},
|
|
"keywords": [
|
|
"cors",
|
|
"cross-domain",
|
|
"http-proxy",
|
|
"proxy",
|
|
"heroku"
|
|
],
|
|
"main": "./lib/cors-anywhere.js",
|
|
"dependencies": {
|
|
"http-proxy": "1.11.1"
|
|
},
|
|
"devDependencies": {
|
|
"mocha": "~2.2.4",
|
|
"nock": "~1.9.0",
|
|
"supertest": "~0.15.0"
|
|
},
|
|
"scripts": {
|
|
"test": "./node_modules/.bin/mocha ./test/test*.js --reporter spec"
|
|
},
|
|
"engines": {
|
|
"node": ">=0.6.6",
|
|
"npm": ">=1.1.0"
|
|
}
|
|
}
|