Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python
import fileinput
import argparse
from operator import itemgetter
parser = argparse.ArgumentParser()
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int)
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+')
args = parser.parse_args()
@mhart
mhart / build-nprof.sh
Last active December 14, 2015 15:19
Create nprof executable based on current node version
(curl https://raw.github.com/bnoordhuis/node-profiler/master/tools/nprof-stub.js; \
for file in splaytree codemap csvparser consarray profile profile_view logreader tickprocessor tickprocessor-driver; \
do curl https://raw.github.com/joyent/node/$(node --version)/deps/v8/tools/$file.js; \
done) > nprof && chmod +x nprof