Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

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 <arlolra@gmail.com>
Artem Zaytsev <a.arepo@gmail.com>
Atsuo Fukaya <fukayatsu@gmail.com>
Ben Noordhuis <info@bnoordhuis.nl> <bnoordhuis@bender.(none)>
Ben Taber <ben.taber@gmail.com>
Bert Belder <bertbelder@gmail.com> <bert@piscisaureus2.(none)>
Bert Belder <bertbelder@gmail.com> <info@2bs.nl>
Bert Belder <bertbelder@gmail.com> <piscisaureus@Berts-MacBook-Pro.local>
Brandon Benvie <brandon@bbenvie.com> <brandon@brandonbenvie.com>
Brian White <mscdex@mscdex.net>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Bryan Cantrill <bmc@joyent.com> <bryan@joyent.com>
Chew Choon Keat <choonkeat@gmail.com>
Christopher Lenz <cmlenz@gmail.com> <chris@lamech.local>
Daniel Berger <code+node@dpbis.net>
Expand All @@ -30,28 +31,37 @@ Elliott Cable <me@ell.io>
EungJun Yi <semtlenori@gmail.com>
Evan Larkin <evan.larkin.il.com> <evan.larkin.iit@gmail.com>
Farid Neshat <FaridN_SOAD@yahoo.com>
Felix Böhm <felixboehm55@googlemail.com> <me@feedic.com>
Felix Geisendörfer <felix@debuggable.com>
Felix Geisendörfer <felix@debuggable.com>
Friedemann Altrock <frodenius@gmail.com>
Fuji Goro <gfuji@cpan.org>
Gabriel de Perthuis <g2p.code@gmail.com>
Gil Pedersen <git@gpost.dk> <github@gpost.dk>
Henry Chin <hheennrryy@gmail.com>
Herbert Vojčík <herby@mailbox.sk>
Igor Soarez <igorsoarez@gmail.com>
Igor Zinkovsky <igorzi@microsoft.com>
Isaac Z. Schlueter <i@izs.me>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Jérémy Lal <kapouer@melix.org>
Jérémy Lal <kapouer@melix.org> <holisme@gmail.com>
Jake Verbaten <raynos2@gmail.com>
Jered Schmidt <tr@nslator.jp>
Joe Shaw <joe@joeshaw.org> <joeshaw@litl.com>
Johan Bergström <bugs@bergstroem.nu>
Johan Dahlberg <jfd@distrop.com> <dahlberg.johan@gmail.com>
Jonas Pfenniger <jonas@pfenniger.name> <jonas@stvs.ch>
Jonathan Rentzsch <jwr.git@redshed.net>
Josh Erickson <josh@snoj.us>
Joshua S. Weinstein <josher19@users.sf.net>
Jérémy Lal <kapouer@melix.org>
Jérémy Lal <kapouer@melix.org> <holisme@gmail.com>
Kai Sasaki Lewuathe <sasaki_kai@lewuathe.sakura.ne.jp>
Kazuyuki Yamada <tasogare.pg@gmail.com>
Koichi Kobayashi <koichik@improvement.jp>
Kris Kowal <kris.kowal@cixar.com>
Kyle Robinson Young <kyle@dontkry.com>
Luke Bayes <lbayes@patternpark.com>
Maciej Małecki <maciej.malecki@notimplemented.org> <me@mmalecki.com>
Mathias Pettersson <mape@mape.me>
Michael Bernstein <michaelrbernstein@gmail.com>
Michael Wilber <gcr@sneakygcr.net>
Expand All @@ -70,22 +80,25 @@ Sam Shull <brickysam26@gmail.com> <brickysam26@samuel-shulls-computer.local>
Sam Shull <brickysam26@gmail.com> <sshull@squaremouth.com>
Sambasiva Suda <sambasivarao@gmail.com>
San-Tai Hsu <v@fatpipi.com>
Scott Blomquist <github@scott.blomqui.st> <sblom@microsoft.com>
Sergey Kryzhanovsky <skryzhanovsky@gmail.com> <another@dhcp199-223-red.yandex.net>
Shannen Saez <shannenlaptop@gmail.com>
Shigeki Ohtsu <ohtsu@d.jp> <ohtsu@iij.ad.jp>
Siddharth Mahendraker <siddharth_mahen@hotmail.com> <siddharth_mahen@me.com>
Simon Willison <simon@simonwillison.net>
Stanislav Opichal <opichals@gmail.com>
Stefan Bühler <stbuehler@web.de>
TJ Holowaychuk <tj@vision-media.ca>
TJ Holowaychuk <tj@vision-media.ca> <tjholowayhuk@gmail.com>
Tadashi SAWADA <cesare@mayverse.jp>
Takahiro ANDO <takahiro.ando@gmail.com>
Ted Young <ted@radicaldesigns.org>
Thomas Lee <thomas.lee@shinetech.com> <tom@tom-debian.sensis.com.au>
Tim Caswell <tim@creationix.com> <tim@0-26-8-e9-4c-e1.dyn.utdallas.edu>
Tim Price <timprice@mangoraft.com>
Tim Smart <timehandgod@gmail.com> <tim@fostle.com>
Tim Smart <timehandgod@gmail.com> <timehandgod@gmail.com>
TJ Holowaychuk <tj@vision-media.ca>
TJ Holowaychuk <tj@vision-media.ca> <tjholowayhuk@gmail.com>
Tom Hughes-Croucher <tom.hughes@palm.com>
Tom Hughes-Croucher <tom.hughes@palm.com> <tom_croucher@yahoo.com>
Trevor Burnham <trevor@databraid.com> <trevorburnham@gmail.com>
Tyler Larson <talltyler@gmail.com>
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 <sam@37signals.com>
Jorge Chamorro Bieling <jorge@jorgechamorro.com>
Evan Larkin <evan.larkin.il.com>
Sean Coates <sean@seancoates.com>
Tom Hughes <tom.hughes@palm.com>
Tom Hughes-Croucher <tom.hughes@palm.com>
Joshua Peek <josh@joshpeek.com>
Nathan Rajlich <nathan@tootallnate.net>
Peteris Krumins <peteris.krumins@gmail.com>
Expand Down Expand Up @@ -415,7 +415,6 @@ Andy Burke <aburke@bitflood.org>
Sugendran Ganess <sugendran@sugendran.net>
Jim Schubert <james.schubert@gmail.com>
Victor Costan <costan@gmail.com>
Timothy J Fontaine <tjfontaine@gmail.com>
Arianit Uka <arianit@bigvikinggames.com>
Andrei Sedoi <bsnote@gmail.com>
Eugene Girshov <eugene.girshov@nixu.com>
Expand All @@ -428,3 +427,5 @@ Paolo Fragomeni <paolo@async.ly>
Scott Blomquist <github@scott.blomqui.st>
Henry Chin <hheennrryy@gmail.com>
Julian Gruber <julian@juliangruber.com>
JeongHoon Byun <outsideris@gmail.com>
Iskren Ivov Chernev <iskren.chernev@gmail.com>
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; npm@1.2.14</p>
<p id="footer">bin &mdash; npm@1.2.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; npm@1.2.14</p>
<p id="footer">bugs &mdash; npm@1.2.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; npm@1.2.14</p>
<p id="footer">commands &mdash; npm@1.2.15</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
Expand Down
Loading

0 comments on commit 2f88272

Please sign in to comment.