Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add more info to benchmark/README.md #629

Merged
merged 1 commit into from
Jan 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
This folder contains benchmark tests to measure the performance for certain
io.js APIs.

## prerequisites

Most of the http benchmarks require `wrk` to be compiled beforehand.

```sh
make wrk
```

## How to run tests

There are two ways to run benchmark tests:
Expand Down Expand Up @@ -80,6 +88,20 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245.
...
```

3. Run tests with options

This example will run only the first type of url test, with one iteration.
(Note: benchmarks require __many__ iterations to be statistically accurate.)


```sh
iojs benchmark/url/url-parse.js type=one n=1
```
Output:
```
url/url-parse.js type=one n=1: 1663.74402
```

## How to write a benchmark test

The benchmark tests are grouped by types. Each type corresponds to a subdirectory,
Expand Down