Skip to content

Instantly share code, notes, and snippets.

View papandreou's full-sized avatar
💭
🤗

Andreas Lind papandreou

💭
🤗
View GitHub Profile
@papandreou
papandreou / afterTest.js
Created January 1, 2016 22:19
Attach after and afterEach inside it block
it('should foo', function () {
console.log("it foo");
after(function () {
console.log("after foo");
});
afterEach(function () {
console.log("afterEach foo");
});
});
@papandreou
papandreou / error.txt
Created March 14, 2016 09:12
duplicated Unexpected error message
2) express-processimage when sharp is available should support rotate with a single argument for gm:
expected 'GET /bulb.gif?rotate=90' to yield response
{
headers: { 'X-Express-Processimage': 'gm' },
body: expect.it('to have metadata satisfying', { format: 'GIF', size: ... })
.and('to resemble', '/home/andreas/work/express-processimage/testdata/rotatedBulb.gif')
}
GET /bulb.gif?rotate=90 HTTP/1.1
@papandreou
papandreou / gist:e8fbd50782e8c5d0b22f5fcf1ba1cc37
Created April 13, 2016 07:53
unexpected-mitm@master (1553297) npm test output
[unexpected-mitm]$ npm test
> unexpected-mitm@9.0.1 test /home/andreas/work/unexpected-mitm
> mocha --compilers md:unexpected-markdown test/*.js `find documentation -name '*.md'` && npm run lint
unexpectedMitm
✓ should mock out a simple request
✓ should mock out a request with a binary body
@papandreou
papandreou / output
Created May 17, 2016 09:13
papandreou/shap-mem-usage, fiddleAround branch (@e56f2b0d)
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
@papandreou
papandreou / gist:ef7543f1b79f7d8857c84d0632ec143c
Created May 17, 2016 12:09
papandreou/shap-mem-usage, fiddleAround branch (@a53ac5ba) WITH JEMALLOC
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
---> Using cache
---> e142b8b8c5c2
@papandreou
papandreou / gist:b71e0f336bf709e743c0889a3db96cb6
Created May 17, 2016 12:18
papandreou/shap-mem-usage, fiddleAround branch (@e01e4c3c) WITH FILE BASED INPUT AND JEMALLOC
[fiddleAround e01e4c3] Use file-based input.
1 file changed, 6 insertions(+), 11 deletions(-)
[sharp-mem-usage]$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
@papandreou
papandreou / gist:818a6ffd729697ed6359f9abbdc7100d
Last active May 23, 2016 16:48
papandreou/sharp-mem-usage, fiddleAround branch (@aca1eb9b) WITH SINGLE BUFFER-BASED BASED INPUT AND JEMALLOC
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
---> Using cache
---> e142b8b8c5c2
@papandreou
papandreou / gist:ec40cdf768043fe0b33cea6097f55483
Last active May 23, 2016 16:41
sharp memory test, node.js 0.10.45, stream input
[sharp-mem-usage]$ node --trace-gc test.js
[20376] 25 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 0 ms [allocation failure].
[20376] 33 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC].
[20376] 42 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [allocation failure].
[20376] 63 ms: Scavenge 4.9 (38.0) -> 3.6 (38.0) MB, 0 ms [allocation failure].
example before iteration #1 { rss: 32428032, heapTotal: 10324992, heapUsed: 4781072 }
example before iteration #2 { rss: 143507456, heapTotal: 11344896, heapUsed: 5253888 }
example before iteration #3 { rss: 259825664, heapTotal: 11344896, heapUsed: 5508976 }
[20376] 1679 ms: Mark-sweep 5.5 (40.0) -> 4.3 (40.0) MB, 3 / 7 ms [external memory allocation limit reached] [GC in old space requested].
example before iteration #4 { rss: 212398080, heapTotal: 11344896, heapUsed: 4582152 }
@papandreou
papandreou / gist:2f81c12b47a9900b790f14db06e6cd24
Last active May 23, 2016 16:47
sharp memory test, node.js 0.10.45, Buffer input, papandreou/sharp-mem-usage#0678a2a3
[sharp-mem-usage]$ node --trace-gc test.js
[21672] 28 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 0 ms [allocation failure].
[21672] 35 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC].
[21672] 44 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [allocation failure].
[21672] 65 ms: Scavenge 4.9 (38.0) -> 3.6 (38.0) MB, 0 ms [allocation failure].
example before iteration #1 { rss: 36028416, heapTotal: 10324992, heapUsed: 4784416 }
example before iteration #2 { rss: 38891520, heapTotal: 10324992, heapUsed: 4971272 }
example before iteration #3 { rss: 44457984, heapTotal: 10324992, heapUsed: 5021840 }
example before iteration #4 { rss: 48631808, heapTotal: 10324992, heapUsed: 5039168 }
example before iteration #5 { rss: 57774080, heapTotal: 10324992, heapUsed: 5056496 }
@papandreou
papandreou / gist:3c30e0b5a11b5c70c87601430656cb6a
Last active May 23, 2016 16:49
papandreou/sharp-mem-usage#0678a2a38 (Buffer-based input)
[sharp-mem-usage]$ node --trace-gc test.js
[21672] 28 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 0 ms [allocation failure].
[21672] 35 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC].
[21672] 44 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [allocation failure].
[21672] 65 ms: Scavenge 4.9 (38.0) -> 3.6 (38.0) MB, 0 ms [allocation failure].
example before iteration #1 { rss: 36028416, heapTotal: 10324992, heapUsed: 4784416 }
example before iteration #2 { rss: 38891520, heapTotal: 10324992, heapUsed: 4971272 }
example before iteration #3 { rss: 44457984, heapTotal: 10324992, heapUsed: 5021840 }
example before iteration #4 { rss: 48631808, heapTotal: 10324992, heapUsed: 5039168 }
example before iteration #5 { rss: 57774080, heapTotal: 10324992, heapUsed: 5056496 }