-# Node.js core benchmark tests
+# io.js core benchmark tests
This folder contains benchmark tests to measure the performance for certain
-Node.js APIs.
+io.js APIs.
## How to run tests
1. Run all tests of a given type, for example, buffers
```sh
-node benchmark/common.js buffers
+iojs benchmark/common.js buffers
```
The above command will find all scripts under `buffers` directory and require
2. Run an individual test, for example, buffer-slice.js
```sh
-node benchmark/buffers/buffer-read.js
+iojs benchmark/buffers/buffer-read.js
```
The output:
```
if (module === require.main) {
var type = process.argv[2];
if (!type) {
- console.error('usage:\n ./node benchmark/common.js <type>');
+ console.error('usage:\n ./iojs benchmark/common.js <type>');
process.exit(1);
}
#!/bin/bash
cd "$(dirname "$(dirname $0)")"
-node=${NODE:-./node}
+node=${NODE:-./iojs}
name=${NAME:-stacks}
ulimit -n 100000
$node benchmark/http_simple.js &
nodepid=$!
-echo "node pid = $nodepid"
+echo "iojs pid = $nodepid"
sleep 1
# has to stay alive until dtrace exits
stackvis dtrace flamegraph-svg < "$name".src > "$name".raw.svg
echo 'Prune tiny stacks out of the graph'
-node -e '
+iojs -e '
var infile = process.argv[1];
var outfile = process.argv[2];
var output = "";
else
k="-k"
fi
-node=${NODE:-./node}
+node=${NODE:-./iojs}
$node benchmark/http_simple.js &
npid=$!
fi
if [ $SERVER == "127.0.0.1" ]; then
- ./node benchmark/http_simple.js &
+ ./iojs benchmark/http_simple.js &
node_pid=$!
sleep 1
fi
filename <- args[0:1]
-data <- ab.load(filename, "node")
+data <- ab.load(filename, "iojs")
# histogram