Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
Conflicts:
	Makefile
	lib/buffer.js
	lib/smalloc.js
	src/node_buffer.cc
	src/node_version.h
	vcbuild.bat
  • Loading branch information
trevnorris committed Jul 10, 2015
2 parents 7387297 + 12bc397 commit 3beae2c
Show file tree
Hide file tree
Showing 1,759 changed files with 165,676 additions and 12,268 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ rules:
## 2 space indentation
indent: [2, 2]
## add space after comma
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
comma-spacing: 1
comma-spacing: 2
## put semi-colon
semi: 2
## require spaces operator like var sum = 1 + 1;
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Igor Zinkovsky <igorzi@microsoft.com>
Isaac Z. Schlueter <i@izs.me>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Jake Verbaten <raynos2@gmail.com>
James Hartig <fastest963@gmail.com> <james.hartig@grooveshark.com>
Jered Schmidt <tr@nslator.jp>
Jeremiah Senkpiel <fishrock123@rocketmail.com>
Joe Shaw <joe@joeshaw.org> <joeshaw@litl.com>
Expand Down
11 changes: 10 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Adam Malcontenti-Wilson <adman.com@gmail.com>
Avi Flax <avi@aviflax.com>
Pedro Teixeira <pedro.teixeira@gmail.com>
Johan Bergström <bugs@bergstroem.nu>
James Hartig <james.hartig@grooveshark.com>
James Hartig <fastest963@gmail.com>
Shannen Saez <shannenlaptop@gmail.com>
Seong-Rak Choi <ragiragi@hanmail.net>
Dave Irvine <davman99@gmail.com>
Expand Down Expand Up @@ -764,5 +764,14 @@ Frederic Hemberger <mail@frederic-hemberger.de>
Sharat M R <cosmosgenius@gmail.com>
Rich Trott <rtrott@gmail.com>
Felipe Batista <fsbatista1@gmail.com>
Rebecca Turner <me@re-becca.org>
Tyler Anton <mtyleranton@gmail.com>
João Reis <reis@janeasystems.com>
Kat Marchán <kzm@sykosomatic.org>
Ryan Petschek <petschekr@gmail.com>
Pierre Inglebert <pierre.inglebert@gmail.com>
Ivan Yan <yan.2314@gmail.com>
Sangmin Yoon <sangmin.yoon@croquis.com>
Mark Plomer <mark.plomer@boerse-go.de>

# Generated by tools/update-authors.sh
122 changes: 120 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,123 @@
# io.js ChangeLog

## 2015-07-09, Version 2.3.4, @Fishrock123

### Notable changes

* **openssl**: Upgrade to 1.0.2d, fixes CVE-2015-1793 (Alternate Chains Certificate Forgery) (Shigeki Ohtsu) [#2141](https://github.com/nodejs/io.js/pull/2141).
* **npm**: Upgraded to v2.12.1, release notes can be found in <https://github.com/npm/npm/releases/tag/v2.12.0> and <https://github.com/npm/npm/releases/tag/v2.12.1> (Kat Marchán) [#2112](https://github.com/nodejs/io.js/pull/2112).

### Known issues

See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues.

* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264).
* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690)
* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760).
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/io.js/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435).

### Commits

* [[`0d15161c24`](https://github.com/nodejs/io.js/commit/0d15161c24)] - **benchmark**: Add some path benchmarks for #1778 (Nathan Woltman) [#1778](https://github.com/nodejs/io.js/pull/1778)
* [[`c70e68fa32`](https://github.com/nodejs/io.js/commit/c70e68fa32)] - **deps**: update deps/openssl/conf/arch/*/opensslconf.h (Shigeki Ohtsu) [#2141](https://github.com/nodejs/io.js/pull/2141)
* [[`ca93f7f2e6`](https://github.com/nodejs/io.js/commit/ca93f7f2e6)] - **deps**: upgrade openssl sources to 1.0.2d (Shigeki Ohtsu) [#2141](https://github.com/nodejs/io.js/pull/2141)
* [[`b18c841ec1`](https://github.com/nodejs/io.js/commit/b18c841ec1)] - **deps**: make node-gyp work with io.js (cjihrig) [iojs/io.js#990](https://github.com/iojs/io.js/pull/990)
* [[`863cdbdd08`](https://github.com/nodejs/io.js/commit/863cdbdd08)] - **deps**: upgrade to npm 2.12.1 (Kat Marchán) [#2112](https://github.com/nodejs/io.js/pull/2112)
* [[`84b3915764`](https://github.com/nodejs/io.js/commit/84b3915764)] - **doc**: document current release procedure (Rod Vagg) [#2099](https://github.com/nodejs/io.js/pull/2099)
* [[`46140334cd`](https://github.com/nodejs/io.js/commit/46140334cd)] - **doc**: update AUTHORS list (Rod Vagg) [#2100](https://github.com/nodejs/io.js/pull/2100)
* [[`bca53dce76`](https://github.com/nodejs/io.js/commit/bca53dce76)] - **path**: refactor for performance and consistency (Nathan Woltman) [#1778](https://github.com/nodejs/io.js/pull/1778)
* [[`6bef15afe7`](https://github.com/nodejs/io.js/commit/6bef15afe7)] - **src**: remove traceSyncIO property from process (Bradley Meck) [#2143](https://github.com/nodejs/io.js/pull/2143)
* [[`2ba1740ba1`](https://github.com/nodejs/io.js/commit/2ba1740ba1)] - **test**: add missing crypto checks (Johan Bergström) [#2129](https://github.com/nodejs/io.js/pull/2129)
* [[`180fd392ca`](https://github.com/nodejs/io.js/commit/180fd392ca)] - **test**: refactor test-repl-tab-complete (Sakthipriyan Vairamani) [#2122](https://github.com/nodejs/io.js/pull/2122)
* [[`fb05c8e27d`](https://github.com/nodejs/io.js/commit/fb05c8e27d)] - ***Revert*** "**test**: add test for missing `close`/`finish` event" (Fedor Indutny)
* [[`9436a860cb`](https://github.com/nodejs/io.js/commit/9436a860cb)] - **test**: add test for missing `close`/`finish` event (Mark Plomer) [iojs/io.js#1373](https://github.com/iojs/io.js/pull/1373)
* [[`ee3ce2ed88`](https://github.com/nodejs/io.js/commit/ee3ce2ed88)] - **tools**: install gdbinit from v8 to $PREFIX/share (Ali Ijaz Sheikh) [#2123](https://github.com/nodejs/io.js/pull/2123)
* [[`dd523c75da`](https://github.com/nodejs/io.js/commit/dd523c75da)] - **win,node-gyp**: enable delay-load hook by default (Bert Belder) [iojs/io.js#1433](https://github.com/iojs/io.js/pull/1433)

## 2015-07-04, Version 2.3.3, @Fishrock123

### Notable changes

* **deps**: Fixed an out-of-band write in utf8 decoder. **This is an important security update** as it can be used to cause a denial of service attack.

### Known issues

See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues.

* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264).
* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690)
* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760).
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/io.js/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435).

## Commits

* [[`030f8045c7`](https://github.com/nodejs/io.js/commit/030f8045c7)] - **deps**: fix out-of-band write in utf8 decoder (Fedor Indutny)
* [[`0f09b8db28`](https://github.com/nodejs/io.js/commit/0f09b8db28)] - **doc**: don't recommend domains for error handling (Benjamin Gruenbaum) [#2056](https://github.com/nodejs/io.js/pull/2056)
* [[`9cd44bb2b6`](https://github.com/nodejs/io.js/commit/9cd44bb2b6)] - **util**: prepend '(node) ' to deprecation messages (Sakthipriyan Vairamani) [#1892](https://github.com/nodejs/io.js/pull/1892)

## 2015-07-01, Version 2.3.2, @rvagg

### Notable changes

* **build**:
- Added support for compiling with Microsoft Visual C++ 2015
- Started building and distributing headers-only tarballs along with binaries

### Known issues

See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues.

* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264).
* Surrogate pair in REPL can freeze terminal [#690](https://github.com/nodejs/io.js/issues/690)
* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760) and fix in [#774](https://github.com/nodejs/io.js/issues/774)
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion [#894](https://github.com/nodejs/io.js/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435).

## Commits

* [[`9180140231`](https://github.com/nodejs/io.js/commit/9180140231)] - **_stream_wrap**: prevent use after free in TLS (Fedor Indutny) [#1910](https://github.com/nodejs/io.js/pull/1910)
* [[`05a73c0f25`](https://github.com/nodejs/io.js/commit/05a73c0f25)] - **benchmark**: make concurrent requests configurable (Rich Trott) [#2068](https://github.com/nodejs/io.js/pull/2068)
* [[`f52d73352e`](https://github.com/nodejs/io.js/commit/f52d73352e)] - **benchmark**: fix typo in README (Rich Trott) [#2067](https://github.com/nodejs/io.js/pull/2067)
* [[`1cd9eeb556`](https://github.com/nodejs/io.js/commit/1cd9eeb556)] - **buffer**: prevent abort on bad proto (Trevor Norris) [#2012](https://github.com/nodejs/io.js/pull/2012)
* [[`8350f3a3a2`](https://github.com/nodejs/io.js/commit/8350f3a3a2)] - **buffer**: optimize Buffer#toString() (Ben Noordhuis) [#2027](https://github.com/nodejs/io.js/pull/2027)
* [[`628a3ab093`](https://github.com/nodejs/io.js/commit/628a3ab093)] - **build**: add tar-headers target for headers-only tar (Rod Vagg) [#1975](https://github.com/nodejs/io.js/pull/1975)
* [[`dcbb9e1da6`](https://github.com/nodejs/io.js/commit/dcbb9e1da6)] - **build**: update build targets for io.js (Rod Vagg) [#1938](https://github.com/nodejs/io.js/pull/1938)
* [[`c87c34c242`](https://github.com/nodejs/io.js/commit/c87c34c242)] - **build**: fix cherry-pick ooops, fix comment wording (Rod Vagg) [#2036](https://github.com/nodejs/io.js/pull/2036)
* [[`4208dc4fef`](https://github.com/nodejs/io.js/commit/4208dc4fef)] - **build**: add MSVS 2015 support (Rod Vagg) [#2036](https://github.com/nodejs/io.js/pull/2036)
* [[`834a365113`](https://github.com/nodejs/io.js/commit/834a365113)] - **build**: DTrace is enabled by default on darwin (Evan Lucas) [#2019](https://github.com/nodejs/io.js/pull/2019)
* [[`c0c0d73269`](https://github.com/nodejs/io.js/commit/c0c0d73269)] - **build,win**: set env before generating projects (Alexis Campailla) [joyent/node#20109](https://github.com/joyent/node/pull/20109)
* [[`9e890fe8b4`](https://github.com/nodejs/io.js/commit/9e890fe8b4)] - **crypto**: fix VerifyCallback in case of verify error (Shigeki Ohtsu) [#2064](https://github.com/nodejs/io.js/pull/2064)
* [[`1f371e3988`](https://github.com/nodejs/io.js/commit/1f371e3988)] - **deps**: copy all openssl header files to include dir (Shigeki Ohtsu) [#2016](https://github.com/nodejs/io.js/pull/2016)
* [[`c370bd3aea`](https://github.com/nodejs/io.js/commit/c370bd3aea)] - **doc**: make the abbreviation 1MM clear (Ivan Yan) [#2053](https://github.com/nodejs/io.js/pull/2053)
* [[`54d5437566`](https://github.com/nodejs/io.js/commit/54d5437566)] - **doc**: Added sample command to test iojs build (Jimmy Hsu) [#850](https://github.com/nodejs/io.js/pull/850)
* [[`f1f1b7e597`](https://github.com/nodejs/io.js/commit/f1f1b7e597)] - **doc**: add TSC meeting minutes 2015-06-17 (Rod Vagg) [#2048](https://github.com/nodejs/io.js/pull/2048)
* [[`dbd5dc932d`](https://github.com/nodejs/io.js/commit/dbd5dc932d)] - **doc**: clarify prerequisites in benchmark/README.md (Jeremiah Senkpiel) [#2034](https://github.com/nodejs/io.js/pull/2034)
* [[`50dbc8e143`](https://github.com/nodejs/io.js/commit/50dbc8e143)] - **doc**: add TSC meeting minutes 2015-05-27 (Rod Vagg) [#2037](https://github.com/nodejs/io.js/pull/2037)
* [[`941ad362a7`](https://github.com/nodejs/io.js/commit/941ad362a7)] - **doc**: archive io.js TC minutes (Rod Vagg)
* [[`644b2eaa89`](https://github.com/nodejs/io.js/commit/644b2eaa89)] - **doc**: rename tc-meetings to tsc-meetings (Rod Vagg)
* [[`1330ee3b27`](https://github.com/nodejs/io.js/commit/1330ee3b27)] - **doc**: add TC meeting 2015-05-13 minutes (Rod Vagg) [#1700](https://github.com/nodejs/io.js/pull/1700)
* [[`392e8fd64e`](https://github.com/nodejs/io.js/commit/392e8fd64e)] - **doc**: add @shigeki and @mscdex to TC (Rod Vagg) [#2008](https://github.com/nodejs/io.js/pull/2008)
* [[`af249fa8a1`](https://github.com/nodejs/io.js/commit/af249fa8a1)] - **net**: wrap connect in nextTick (Evan Lucas) [#2054](https://github.com/nodejs/io.js/pull/2054)
* [[`7f63449fde`](https://github.com/nodejs/io.js/commit/7f63449fde)] - **net**: fix debug for dnsopts (Evan Lucas) [#2059](https://github.com/nodejs/io.js/pull/2059)
* [[`eabed2f518`](https://github.com/nodejs/io.js/commit/eabed2f518)] - **repl**: remove obsolete TODO (Rich Trott) [#2081](https://github.com/nodejs/io.js/pull/2081)
* [[`a198c68b56`](https://github.com/nodejs/io.js/commit/a198c68b56)] - **repl**: make 'Unexpected token' errors recoverable (Julien Gilli) [#2052](https://github.com/nodejs/io.js/pull/2052)
* [[`d735b2c6ef`](https://github.com/nodejs/io.js/commit/d735b2c6ef)] - **repl**: fix tab completion for a non-global context (Sangmin Yoon) [#2052](https://github.com/nodejs/io.js/pull/2052)
* [[`8cee8f54fc`](https://github.com/nodejs/io.js/commit/8cee8f54fc)] - **src**: nix stdin _readableState.reading manipulation (Chris Dickinson) [#454](https://github.com/nodejs/io.js/pull/454)
* [[`856c11f8c8`](https://github.com/nodejs/io.js/commit/856c11f8c8)] - **test**: purge stale disabled tests (Rich Trott) [#2045](https://github.com/nodejs/io.js/pull/2045)
* [[`4d5089e181`](https://github.com/nodejs/io.js/commit/4d5089e181)] - **test**: do not swallow OpenSSL support error (Rich Trott) [#2042](https://github.com/nodejs/io.js/pull/2042)
* [[`06721fe005`](https://github.com/nodejs/io.js/commit/06721fe005)] - **test**: fix test-repl-tab-complete.js (cjihrig) [#2052](https://github.com/nodejs/io.js/pull/2052)
* [[`8e9089ac35`](https://github.com/nodejs/io.js/commit/8e9089ac35)] - **test**: check for error on Windows (Rich Trott) [#2035](https://github.com/nodejs/io.js/pull/2035)
* [[`776a65ebcd`](https://github.com/nodejs/io.js/commit/776a65ebcd)] - **test**: remove obsolete TODO comments (Rich Trott) [#2033](https://github.com/nodejs/io.js/pull/2033)
* [[`bdfeb798ad`](https://github.com/nodejs/io.js/commit/bdfeb798ad)] - **test**: remove obsolete TODO comments (Rich Trott) [#2032](https://github.com/nodejs/io.js/pull/2032)
* [[`58e914f9bc`](https://github.com/nodejs/io.js/commit/58e914f9bc)] - **tools**: fix gyp to work on MacOSX without XCode (Shigeki Ohtsu) [iojs/io.js#1325](https://github.com/iojs/io.js/pull/1325)
* [[`99cbbc0a13`](https://github.com/nodejs/io.js/commit/99cbbc0a13)] - **tools**: update gyp to 25ed9ac (Ben Noordhuis) [#2074](https://github.com/nodejs/io.js/pull/2074)
* [[`e3f9335c40`](https://github.com/nodejs/io.js/commit/e3f9335c40)] - **tools**: re-enable comma-spacing linter rule (Roman Reiss) [#2072](https://github.com/nodejs/io.js/pull/2072)
* [[`d91e10b3bd`](https://github.com/nodejs/io.js/commit/d91e10b3bd)] - **tools**: update eslint to 0.24.0 (Roman Reiss) [#2072](https://github.com/nodejs/io.js/pull/2072)
* [[`6c61ca5325`](https://github.com/nodejs/io.js/commit/6c61ca5325)] - **url**: fix typo in comment (Rich Trott) [#2071](https://github.com/nodejs/io.js/pull/2071)
* [[`1a51f0058c`](https://github.com/nodejs/io.js/commit/1a51f0058c)] - **v8**: cherry-pick JitCodeEvent patch from upstream (Ben Noordhuis) [#2075](https://github.com/nodejs/io.js/pull/2075)

## 2015-06-23, Version 2.3.1, @rvagg

### Notable changes
Expand Down Expand Up @@ -209,8 +327,8 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren
### Commits

* [[`c5a1009903`](https://github.com/nodejs/io.js/commit/c5a1009903)] - **build**: avoid passing empty strings to build flags (Johan Bergström) [#1789](https://github.com/nodejs/io.js/pull/1789)
* [[`5d83401086`](https://github.com/nodejs/io.js/commit/5d83401086)] - **doc**: put SEMVER-MINOR on pre-load module fix 2.2.0 (Rod Vagg)
* [[`4d6b768e5d`](https://github.com/nodejs/io.js/commit/4d6b768e5d)] - **http**: revert deprecation of client property (Michaël Zasso) [#1852](https://github.com/nodejs/io.js/pull/1852)
* [[`5d83401086`](https://github.com/nodejs/io.js/commit/5d83401086)] - **doc**: put SEMVER-MINOR on pre-load module fix 2.2.0 (Rod Vagg)
* [[`4d6b768e5d`](https://github.com/nodejs/io.js/commit/4d6b768e5d)] - **http**: revert deprecation of client property (Michaël Zasso) [#1852](https://github.com/nodejs/io.js/pull/1852)

## 2015-05-31, Version 2.2.0, @rvagg

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ docopen: out/doc/api/all.html
docclean:
-rm -rf out/doc

run-ci:
$(PYTHON) ./configure $(CONFIG_FLAGS)
$(MAKE)
$(MAKE) test-ci

RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
VERSION=v$(RAWVER)

Expand Down Expand Up @@ -464,4 +469,4 @@ lint: jslint cpplint
dynamiclib test test-all test-addons build-addons website-upload pkg \
blog blogclean tar binary release-only bench-http-simple bench-idle \
bench-all bench bench-misc bench-array bench-buffer bench-net \
bench-http bench-fs bench-tls cctest
bench-http bench-fs bench-tls cctest run-ci
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ To read the documentation:
$ man doc/iojs.1
```

To test if io.js was built correctly:

```
$ iojs -e "console.log('Hello from io.js ' + process.version)"
```

### Windows

Prerequisites:
Expand All @@ -140,6 +146,12 @@ To run the tests:
> vcbuild test
```

To test if io.js was built correctly:

```
$ iojs -e "console.log('Hello from io.js ' + process.version)"
```

### Android / Android based devices, aka. Firefox OS

Be sure you have downloaded and extracted [Android NDK]
Expand Down Expand Up @@ -319,10 +331,10 @@ information about the governance of the io.js project, see
* **Nikolai Vavilov** &lt;vvnicholas@gmail.com&gt; ([@seishun](https://github.com/seishun))
* **Nicu Micleușanu** &lt;micnic90@gmail.com&gt; ([@micnic](https://github.com/micnic))
* **Aleksey Smolenchuk** &lt;lxe@lxe.co&gt; ([@lxe](https://github.com/lxe))
* **Shigeki Ohtsu** &lt;ohtsu@iij.ad.jp&gt; ([@shigeki](https://github.com/shigeki))
* **Shigeki Ohtsu** &lt;ohtsu@iij.ad.jp&gt; ([@shigeki](https://github.com/shigeki)) (Technical Committee)
* **Sam Roberts** &lt;vieuxtech@gmail.com&gt; ([@sam-github](https://github.com/sam-github))
* **Wyatt Preul** &lt;wpreul@gmail.com&gt; ([@geek](https://github.com/geek))
* **Brian White** &lt;mscdex@mscdex.net&gt; ([@mscdex](https://github.com/mscdex))
* **Brian White** &lt;mscdex@mscdex.net&gt; ([@mscdex](https://github.com/mscdex)) (Technical Committee)
* **Christian Tellnes** &lt;christian@tellnes.no&gt; ([@tellnes](https://github.com/tellnes))
* **Robert Kowalski** &lt;rok@kowalski.gd&gt; ([@robertkowalski](https://github.com/robertkowalski))
* **Julian Duque** &lt;julianduquej@gmail.com&gt; ([@julianduque](https://github.com/julianduque))
Expand Down
8 changes: 6 additions & 2 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ io.js APIs.

## Prerequisites

Most of the http benchmarks require [`wrk`][wrk] and [`ab`][ab] being installed.
These are most often available through your preferred package manager.
Most of the http benchmarks require [`wrk`][wrk] and [`ab`][ab] (ApacheBench) being installed.
These may be available through your preferred package manager.

If they are not available:
- `wrk` may easily be built [from source][wrk] via `make`.
- `ab` is sometimes bundled in a package called `apache2-utils`.

[wrk]: https://github.com/wg/wrk
[ab]: http://httpd.apache.org/docs/2.2/programs/ab.html
Expand Down
26 changes: 26 additions & 0 deletions benchmark/buffers/buffer-tostring.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

const common = require('../common.js');

const bench = common.createBenchmark(main, {
arg: [true, false],
len: [0, 1, 64, 1024],
n: [1e7]
});

function main(conf) {
const arg = conf.arg;
const len = conf.len | 0;
const n = conf.n | 0;
const buf = Buffer(len).fill(42);

bench.start();
if (arg) {
for (var i = 0; i < n; i += 1)
buf.toString('utf8');
} else {
for (var i = 0; i < n; i += 1)
buf.toString();
}
bench.end(n);
}
Loading

0 comments on commit 3beae2c

Please sign in to comment.