$ node --expose-gc server.js
in another terminal:
$ curl localhost:5001
output in first terminal shows that req.foo
is still sitting in the heap:
# this will eat about 500MB of RAM | |
thecache = [] | |
rnd_str = (length=30) -> | |
text = "" | |
possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" | |
while text.length < length | |
text += possible.charAt(Math.floor(Math.random() * possible.length)) | |
text |
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"io" | |
"labix.org/v2/pipe" | |
"os" | |
) |
package main | |
import ( | |
gopgp "code.google.com/p/go.crypto/openpgp" | |
gopgperrors "code.google.com/p/go.crypto/openpgp/errors" | |
"fmt" | |
"io" | |
"os" | |
) |
enscript -E --color -wPostScript --toc -pfoo.ps * |
#!/usr/bin/env bash | |
# create a string of "a"s that is length $1 | |
longstr=$(head -c $1 < /dev/zero | tr '\0' '\141') | |
sleep 1200 |
{Readable,Transform} = require 'stream' | |
crypto = require 'crypto' | |
report = (stream) -> | |
int = setInterval -> | |
console.log "#{stream.constructor.name}(#{stream._writableState?.length or ''} #{stream._readableState?.length or ''})" | |
, 1000 | |
stream.on 'end', -> clearInterval int | |
# generates a bunch of bytes |
{Readable,Transform} = require 'stream' | |
crypto = require 'crypto' | |
report = (stream) -> | |
int = setInterval -> | |
console.log "#{stream.constructor.name}(#{stream._writableState?.length or ''} #{stream._readableState?.length or ''})" | |
, 1000 | |
stream.on 'end', -> clearInterval int | |
# generates a bunch of strings |
FROM salted | |
# /etc/hosts and /etc/hostname are read only. so change minion config | |
RUN HOSTNAME=`hostname` && sed "s/#id:/id: container-{{ name }}-$HOSTNAME/" -i /etc/salt/minion | |
ADD {{ salt_dir }} /srv/salt | |
ADD {{ pillar_dir }} /srv/pillar | |
RUN rm -f /etc/salt/minion_id | |
RUN salt-call --local state.highstate |
package main | |
import ( | |
"fmt" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"log" | |
"os" | |
"strings" | |
"text/tabwriter" |
$ node --expose-gc server.js
in another terminal:
$ curl localhost:5001
output in first terminal shows that req.foo
is still sitting in the heap: