benchmark: fix command name in benchmark scripts
PR-URL: https://github.com/iojs/io.js/pull/410 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
a7f530964b
commit
182c3b689c
@ -1,7 +1,7 @@
|
|||||||
# Node.js core benchmark tests
|
# io.js core benchmark tests
|
||||||
|
|
||||||
This folder contains benchmark tests to measure the performance for certain
|
This folder contains benchmark tests to measure the performance for certain
|
||||||
Node.js APIs.
|
io.js APIs.
|
||||||
|
|
||||||
## How to run tests
|
## How to run tests
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ There are two ways to run benchmark tests:
|
|||||||
1. Run all tests of a given type, for example, buffers
|
1. Run all tests of a given type, for example, buffers
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
node benchmark/common.js buffers
|
iojs benchmark/common.js buffers
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command will find all scripts under `buffers` directory and require
|
The above command will find all scripts under `buffers` directory and require
|
||||||
@ -70,7 +70,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244.
|
|||||||
2. Run an individual test, for example, buffer-slice.js
|
2. Run an individual test, for example, buffer-slice.js
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
node benchmark/buffers/buffer-read.js
|
iojs benchmark/buffers/buffer-read.js
|
||||||
```
|
```
|
||||||
The output:
|
The output:
|
||||||
```
|
```
|
||||||
|
@ -8,7 +8,7 @@ exports.PORT = process.env.PORT || 12346;
|
|||||||
if (module === require.main) {
|
if (module === require.main) {
|
||||||
var type = process.argv[2];
|
var type = process.argv[2];
|
||||||
if (!type) {
|
if (!type) {
|
||||||
console.error('usage:\n ./node benchmark/common.js <type>');
|
console.error('usage:\n ./iojs benchmark/common.js <type>');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname "$(dirname $0)")"
|
cd "$(dirname "$(dirname $0)")"
|
||||||
|
|
||||||
node=${NODE:-./node}
|
node=${NODE:-./iojs}
|
||||||
|
|
||||||
name=${NAME:-stacks}
|
name=${NAME:-stacks}
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ fi
|
|||||||
ulimit -n 100000
|
ulimit -n 100000
|
||||||
$node benchmark/http_simple.js &
|
$node benchmark/http_simple.js &
|
||||||
nodepid=$!
|
nodepid=$!
|
||||||
echo "node pid = $nodepid"
|
echo "iojs pid = $nodepid"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# has to stay alive until dtrace exits
|
# has to stay alive until dtrace exits
|
||||||
@ -62,7 +62,7 @@ echo 'Turn the stacks into a svg'
|
|||||||
stackvis dtrace flamegraph-svg < "$name".src > "$name".raw.svg
|
stackvis dtrace flamegraph-svg < "$name".src > "$name".raw.svg
|
||||||
|
|
||||||
echo 'Prune tiny stacks out of the graph'
|
echo 'Prune tiny stacks out of the graph'
|
||||||
node -e '
|
iojs -e '
|
||||||
var infile = process.argv[1];
|
var infile = process.argv[1];
|
||||||
var outfile = process.argv[2];
|
var outfile = process.argv[2];
|
||||||
var output = "";
|
var output = "";
|
||||||
|
@ -24,7 +24,7 @@ if [ "$k" = "no" ]; then
|
|||||||
else
|
else
|
||||||
k="-k"
|
k="-k"
|
||||||
fi
|
fi
|
||||||
node=${NODE:-./node}
|
node=${NODE:-./iojs}
|
||||||
|
|
||||||
$node benchmark/http_simple.js &
|
$node benchmark/http_simple.js &
|
||||||
npid=$!
|
npid=$!
|
||||||
|
@ -14,7 +14,7 @@ if [ ! -d benchmark/ ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SERVER == "127.0.0.1" ]; then
|
if [ $SERVER == "127.0.0.1" ]; then
|
||||||
./node benchmark/http_simple.js &
|
./iojs benchmark/http_simple.js &
|
||||||
node_pid=$!
|
node_pid=$!
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
|
@ -52,7 +52,7 @@ ab.load <- function (filename, name) {
|
|||||||
|
|
||||||
|
|
||||||
filename <- args[0:1]
|
filename <- args[0:1]
|
||||||
data <- ab.load(filename, "node")
|
data <- ab.load(filename, "iojs")
|
||||||
|
|
||||||
|
|
||||||
# histogram
|
# histogram
|
||||||
|
Loading…
x
Reference in New Issue
Block a user