This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { graphqlExpress } = require('graphql-server-express'); | |
const graphQlTools = require('graphql-tools'); | |
const schema = graphQlTools.makeExecutableSchema({ | |
typeDefs: schemaText, | |
resolvers: { | |
Mutation: { | |
async uploadFiles(obj, { input }, req, info }) { | |
// ... | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph "state machine" { | |
start [style=solid]; | |
start_boolean [style=solid, label = ""]; | |
start_boolean_tobetrue [shape="doublecircle", style="solid", label = ""] | |
start_boolean_tobefalse [shape="doublecircle", style="solid", label = ""] | |
start_string_nottocontain [style="solid", label = ""]; | |
start_string_nottocontain_string [shape="doublecircle", style="solid", label = ""]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
function awaitEcho() { | |
var buf = new Buffer(100); | |
var numRead; | |
var offset = 0; | |
var startTime = Date.now(); | |
do { | |
if (offset >= buf.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sharp-mem-usage]$ node --trace-gc test.js | |
[20872] 72 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 1 ms [allocation failure]. | |
[20872] 87 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC]. | |
[20872] 104 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [Runtime::PerformGC]. | |
[20872] 125 ms: Scavenge 4.9 (38.0) -> 3.5 (38.0) MB, 0 ms [allocation failure]. | |
example before iteration #1 { rss: 30646272, heapTotal: 10324992, heapUsed: 4529480 } | |
interpolateWith: Please use resize(w, h, { interpolator: ... }) instead | |
Nan::NewBuffer 0x7f4394140030 | |
example before iteration #2 { rss: 39936000, heapTotal: 10324992, heapUsed: 4731056 } | |
Nan::NewBuffer 0x7f43503e64d0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sharp-mem-usage]$ node --trace-gc test.js | |
[14826] 51 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 0 ms [allocation failure]. | |
[14826] 62 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC]. | |
[14826] 76 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [Runtime::PerformGC]. | |
[14826] 104 ms: Scavenge 4.9 (38.0) -> 3.5 (38.0) MB, 0 ms [allocation failure]. | |
example before iteration #1 { rss: 30654464, heapTotal: 10324992, heapUsed: 4529480 } | |
interpolateWith: Please use resize(w, h, { interpolator: ... }) instead | |
vips_tracked_get_mem 0 | |
vips_tracked_get_mem_highwater 0 | |
vips_tracked_get_allocs 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sharp-mem-usage]$ node --trace-gc test.js & while true; do smem |grep -P 'PID|node' ; done | |
[1] 6993 | |
[6993] 52 ms: Scavenge 2.0 (34.0) -> 1.7 (36.0) MB, 0 ms [allocation failure]. | |
[6993] 64 ms: Scavenge 2.6 (37.0) -> 2.2 (37.0) MB, 0 ms [Runtime::PerformGC]. | |
[6993] 78 ms: Scavenge 3.1 (38.0) -> 2.6 (38.0) MB, 0 ms [Runtime::PerformGC]. | |
[6993] 107 ms: Scavenge 4.9 (38.0) -> 3.6 (38.0) MB, 0 ms [allocation failure]. | |
example before iteration #1 { rss: 30470144, heapTotal: 10324992, heapUsed: 4537384 } | |
interpolateWith: Please use resize(w, h, { interpolator: ... }) instead | |
PID User Command Swap USS PSS RSS | |
6993 andreas node --trace-gc test.js 0 617176 617220 620712 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 } | |
example before iteration #5 { rss: 221171712, heapTotal: 11344896, heapUsed: 4827872 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 } |