Skip to content

Commit

Permalink
Merge remote-tracking branch 'ry/v0.10' into master
Browse files Browse the repository at this point in the history
Conflicts:
	src/node.cc
	src/node_version.h
  • Loading branch information
isaacs committed Mar 21, 2013
2 parents f150d56 + 92cc187 commit 2f88272
Show file tree
Hide file tree
Showing 160 changed files with 1,264 additions and 457 deletions.
23 changes: 18 additions & 5 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Arlo Breault <[email protected]>
Artem Zaytsev <[email protected]>
Atsuo Fukaya <[email protected]>
Ben Noordhuis <[email protected]> <bnoordhuis@bender.(none)>
Ben Taber <[email protected]>
Bert Belder <[email protected]> <bert@piscisaureus2.(none)>
Bert Belder <[email protected]> <[email protected]>
Bert Belder <[email protected]> <[email protected]>
Brandon Benvie <[email protected]> <[email protected]>
Brian White <[email protected]>
Brian White <[email protected]> <[email protected]>
Bryan Cantrill <[email protected]> <[email protected]>
Chew Choon Keat <[email protected]>
Christopher Lenz <[email protected]> <[email protected]>
Daniel Berger <[email protected]>
Expand All @@ -30,28 +31,37 @@ Elliott Cable <[email protected]>
EungJun Yi <[email protected]>
Evan Larkin <evan.larkin.il.com> <[email protected]>
Farid Neshat <[email protected]>
Felix Böhm <[email protected]> <[email protected]>
Felix Geisendörfer <[email protected]>
Felix Geisendörfer <[email protected]>
Friedemann Altrock <[email protected]>
Fuji Goro <[email protected]>
Gabriel de Perthuis <[email protected]>
Gil Pedersen <[email protected]> <[email protected]>
Henry Chin <[email protected]>
Herbert Vojčík <[email protected]>
Igor Soarez <[email protected]>
Igor Zinkovsky <[email protected]>
Isaac Z. Schlueter <[email protected]>
Isaac Z. Schlueter <[email protected]> <[email protected]>
Jérémy Lal <[email protected]>
Jérémy Lal <[email protected]> <[email protected]>
Jake Verbaten <[email protected]>
Jered Schmidt <[email protected]>
Joe Shaw <[email protected]> <[email protected]>
Johan Bergström <[email protected]>
Johan Dahlberg <[email protected]> <[email protected]>
Jonas Pfenniger <[email protected]> <[email protected]>
Jonathan Rentzsch <[email protected]>
Josh Erickson <[email protected]>
Joshua S. Weinstein <[email protected]>
Jérémy Lal <[email protected]>
Jérémy Lal <[email protected]> <[email protected]>
Kai Sasaki Lewuathe <[email protected]>
Kazuyuki Yamada <[email protected]>
Koichi Kobayashi <[email protected]>
Kris Kowal <[email protected]>
Kyle Robinson Young <[email protected]>
Luke Bayes <[email protected]>
Maciej Małecki <[email protected]> <[email protected]>
Mathias Pettersson <[email protected]>
Michael Bernstein <[email protected]>
Michael Wilber <[email protected]>
Expand All @@ -70,22 +80,25 @@ Sam Shull <[email protected]> <[email protected]>
Sam Shull <[email protected]> <[email protected]>
Sambasiva Suda <[email protected]>
San-Tai Hsu <[email protected]>
Scott Blomquist <[email protected]> <[email protected]>
Sergey Kryzhanovsky <[email protected]> <[email protected]>
Shannen Saez <[email protected]>
Shigeki Ohtsu <[email protected]> <[email protected]>
Siddharth Mahendraker <[email protected]> <[email protected]>
Simon Willison <[email protected]>
Stanislav Opichal <[email protected]>
Stefan Bühler <[email protected]>
TJ Holowaychuk <[email protected]>
TJ Holowaychuk <[email protected]> <[email protected]>
Tadashi SAWADA <[email protected]>
Takahiro ANDO <[email protected]>
Ted Young <[email protected]>
Thomas Lee <[email protected]> <[email protected]>
Tim Caswell <[email protected]> <[email protected]>
Tim Price <[email protected]>
Tim Smart <[email protected]> <[email protected]>
Tim Smart <[email protected]> <[email protected]>
TJ Holowaychuk <[email protected]>
TJ Holowaychuk <[email protected]> <[email protected]>
Tom Hughes-Croucher <[email protected]>
Tom Hughes-Croucher <[email protected]> <[email protected]>
Trevor Burnham <[email protected]> <[email protected]>
Tyler Larson <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Sam Stephenson <[email protected]>
Jorge Chamorro Bieling <[email protected]>
Evan Larkin <evan.larkin.il.com>
Sean Coates <[email protected]>
Tom Hughes <[email protected]>
Tom Hughes-Croucher <[email protected]>
Joshua Peek <[email protected]>
Nathan Rajlich <[email protected]>
Peteris Krumins <[email protected]>
Expand Down Expand Up @@ -415,7 +415,6 @@ Andy Burke <[email protected]>
Sugendran Ganess <[email protected]>
Jim Schubert <[email protected]>
Victor Costan <[email protected]>
Timothy J Fontaine <[email protected]>
Arianit Uka <[email protected]>
Andrei Sedoi <[email protected]>
Eugene Girshov <[email protected]>
Expand All @@ -428,3 +427,5 @@ Paolo Fragomeni <[email protected]>
Scott Blomquist <[email protected]>
Henry Chin <[email protected]>
Julian Gruber <[email protected]>
JeongHoon Byun <[email protected]>
Iskren Ivov Chernev <[email protected]>
33 changes: 32 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
2013.03.11, Version 0.10.0 (Stable)
2013.03.21, Version 0.10.1 (Stable)

* npm: upgrade to 1.2.15

* crypto: Improve performance of non-stream APIs (Fedor Indutny)

* tls: always reset this.ssl.error after handling (Fedor Indutny)

* tls: Prevent mid-stream hangs (Fedor Indutny, isaacs)

* net: improve arbitrary tcp socket support (Ben Noordhuis)

* net: handle 'finish' event only after 'connect' (Fedor Indutny)

* http: Don't hot-path end() for large buffers (isaacs)

* fs: Missing cb errors are deprecated, not a throw (isaacs)

* fs: make write/appendFileSync correctly set file mode (Raymond Feng)

* stream: Return self from readable.wrap (isaacs)

* stream: Never call decoder.end() multiple times (Gil Pedersen)

* windows: enable watching signals with process.on('SIGXYZ') (Bert Belder)

* node: revert removal of MakeCallback (Trevor Norris)

* node: Unwrap without aborting in handle fd getter (isaacs)


2013.03.11, Version 0.10.0 (Stable), 163ca274230fce536afe76c64676c332693ad7c1

* npm: Upgrade to 1.2.14

Expand Down
24 changes: 6 additions & 18 deletions benchmark/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,24 @@ if (nodes.length !== 2)

var spawn = require('child_process').spawn;
var results = {};
var n = 1;
var toggle = 1;
var r = (+process.env.NODE_BENCH_RUNS || 1) * 2;

run();

var RUNS = +process.env.NODE_BENCH_RUNS || 1;
var r = RUNS;
function run() {
// Flip back and forth between the two binaries.
if (n === 1) {
n--;
} else {
r--;
if (r === 0)
return compare();
else
n++;
}

if (n === -1)
if (--r < 0)
return compare();
toggle = ++toggle % 2;

var node = nodes[n];
var node = nodes[toggle];
console.error('running %s', node);
var env = {};
for (var i in process.env)
env[i] = process.env[i];
env.NODE = node;
var child = spawn('make', [runBench], { env: env });

var out = '';
var child = spawn('make', [runBench], { env: env });
child.stdout.setEncoding('utf8');
child.stdout.on('data', function(c) {
out += c;
Expand Down
59 changes: 59 additions & 0 deletions benchmark/http/end-vs-write-end.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// When calling .end(buffer) right away, this triggers a "hot path"
// optimization in http.js, to avoid an extra write call.
//
// However, the overhead of copying a large buffer is higher than
// the overhead of an extra write() call, so the hot path was not
// always as hot as it could be.
//
// Verify that our assumptions are valid.

var common = require('../common.js');
var PORT = common.PORT;

var bench = common.createBenchmark(main, {
type: ['asc', 'utf', 'buf'],
kb: [64, 128, 256, 1024],
c: [100],
method: ['write', 'end '] // two spaces added to line up each row
});

function main(conf) {
http = require('http');
var chunk;
var len = conf.kb * 1024;
switch (conf.type) {
case 'buf':
chunk = new Buffer(len);
chunk.fill('x');
break;
case 'utf':
encoding = 'utf8';
chunk = new Array(len / 2 + 1).join('ü');
break;
case 'asc':
chunk = new Array(len + 1).join('a');
break;
}

function write(res) {
res.write(chunk);
res.end();
}

function end(res) {
res.end(chunk);
}

var method = conf.method === 'write' ? write : end;
var args = ['-r', 5000, '-t', 8, '-c', conf.c];

var server = http.createServer(function(req, res) {
method(res);
});

server.listen(common.PORT, function() {
bench.http('/', args, function() {
server.close();
});
});
}
61 changes: 61 additions & 0 deletions benchmark/net/dgram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// test UDP send/recv throughput

var common = require('../common.js');
var PORT = common.PORT;

// `num` is the number of send requests to queue up each time.
// Keep it reasonably high (>10) otherwise you're benchmarking the speed of
// event loop cycles more than anything else.
var bench = common.createBenchmark(main, {
len: [1, 64, 256, 1024],
num: [100],
type: ['send', 'recv'],
dur: [5]
});

var dur;
var len;
var num;
var type;
var chunk;
var encoding;

function main(conf) {
dur = +conf.dur;
len = +conf.len;
num = +conf.num;
type = conf.type;
chunk = new Buffer(len);
server();
}

var dgram = require('dgram');

function server() {
var sent = 0;
var received = 0;
var socket = dgram.createSocket('udp4');

function onsend() {
if (sent++ % num == 0)
for (var i = 0; i < num; i++)
socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', onsend);
}

socket.on('listening', function() {
bench.start();
onsend();

setTimeout(function() {
var bytes = (type === 'send' ? sent : received) * chunk.length;
var gbits = (bytes * 8) / (1024 * 1024 * 1024);
bench.end(gbits);
}, dur * 1000);
});

socket.on('message', function(buf, rinfo) {
received++;
});

socket.bind(PORT);
}
3 changes: 3 additions & 0 deletions deps/npm/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.swp
.*.swp
npm-debug.log
/test/bin
/test/output.log
Expand All @@ -20,3 +21,5 @@ html/*.png
!.npmignore

/npm-*.tgz

*.pyc
2 changes: 1 addition & 1 deletion deps/npm/doc/cli/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ npm will not help you do something that is known to be a bad idea.
No. This will never happen. This question comes up sometimes,
because it seems silly from the outside that npm couldn't just be
configured to put stuff somewhere else, and then npm could load them
from there. It's an arbitrary spelling choice, right? What's the bg
from there. It's an arbitrary spelling choice, right? What's the big
deal?

At the time of this writing, the string `'node_modules'` appears 151
Expand Down
27 changes: 24 additions & 3 deletions deps/npm/doc/cli/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,27 @@ you can specify the value for "bugs" as a simple string instead of an object.

If a url is provided, it will be used by the `npm bugs` command.

## license

You should specify a license for your package so that people know how they are
permitted to use it, and any restrictions you're placing on it.

The simplest way, assuming you're using a common license such as BSD or MIT, is
to just specify the name of the license you're using, like this:

{ "license" : "BSD" }

If you have more complex licensing terms, or you want to provide more detail
in your package.json file, you can use the more verbose plural form, like this:

"licenses" : [
{ "type" : "MyLicense"
, "url" : "http://github.com/owner/project/path/to/license"
}
]

It's also a good idea to include a license file at the top level in your package.

## people fields: author, contributors

The "author" is one person. "contributors" is an array of people. A "person"
Expand Down Expand Up @@ -416,9 +437,9 @@ In this case, it's best to list these additional items in a
`devDependencies` hash.

These things will be installed whenever the `--dev` configuration flag
is set. This flag is set automatically when doing `npm link`, and can
be managed like any other npm configuration param. See `npm-config(1)`
for more on the topic.
is set. This flag is set automatically when doing `npm link` or when doing
`npm install` from the root of a package, and can be managed like any other npm
configuration param. See `npm-config(1)` for more on the topic.

## bundledDependencies

Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/bin.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
<p id="footer">bin &mdash; [email protected].14</p>
<p id="footer">bin &mdash; [email protected].15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
<p id="footer">bugs &mdash; [email protected].14</p>
<p id="footer">bugs &mdash; [email protected].15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/html/api/commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>

<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
<p id="footer">commands &mdash; [email protected].14</p>
<p id="footer">commands &mdash; [email protected].15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
Loading

0 comments on commit 2f88272

Please sign in to comment.