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

Commit

Permalink
merged 'v0.6' intro AndreasMadsen/master
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasMadsen committed Nov 26, 2011
2 parents 387b1f5 + 3a16064 commit 873877b
Show file tree
Hide file tree
Showing 508 changed files with 31,907 additions and 1,039 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ ipch/
/options.gypi
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,6 @@ Zachary Scott <[email protected]>
Jordan Sissel <[email protected]>
Matt Robenolt <[email protected]>
Jacob H.C. Kragh <[email protected]>
Benjamin Pasero <[email protected]>
Scott Anderson <[email protected]>
Yoji SHIDARA <[email protected]>
100 changes: 90 additions & 10 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,84 @@
2011.11.04, Version 0.6.0 (stable)
2011.11.25, Version 0.6.3 (stable)

* #2083 Land NPM in Node. It is included in packages/installers and installed
on `make install`.

* #2076 Add logos to windows installer.

* #1711 Correctly handle http requests without headers. (Ben Noordhuis,
Felix Geisendörfer)

* TLS: expose more openssl SSL context options and constants. (Ben Noordhuis)

* #2177 Windows: don't kill UDP socket when a packet fails to reach its
destination. (Bert Belder)

* Windows: support paths longer than 260 characters. (Igor Zinkovsky)

* Windows: correctly resolve drive-relative paths. (Bert Belder)

* #2166 Don't leave file descriptor open after lchmod. (Isaac Schlueter)

* #2084 Add OS X .pkg build script to make file.

* #2160 Documentation improvements. (Ben Noordhuis)


2011.11.18, Version 0.6.2 (stable), a4402f0b2e410b19375a1d5c5fb7fe7f66f3c7f8

* doc improvements (Artur Adib, Trevor Burnham, Ryan Emery, Trent Mick)

* timers: remember extra setTimeout() arguments when timeout==0

* punycode: use Mathias Bynens's punycode library, it's more compliant

* repl: improved tab completion (Ryan Emery)

* buffer: fix range checks in .writeInt() functions (Lukasz Walukiewicz)

* tls: make cipher list configurable

* addons: make Buffer and ObjectWrap visible to Windows add-ons (Bert Belder)

* crypto: add PKCS#1 a.k.a RSA public key verification support

* windows: fix stdout writes when redirected to nul

* sunos: fix build on Solaris and Illumos

* Upgrade V8 to 3.6.6.8


2011.11.11, Version 0.6.1 (stable), 170f2addb2dd0c625bc4a6d461e89a31ad68b79b

* doc improvements (Eric Lovett, Ben Noordhuis, Scott Anderson, Yoji SHIDARA)

* crypto: make thread-safe (Ben Noordhuis)

* fix process.kill error object

* debugger: correctly handle source with multi-byte characters (Shigeki Ohtsu)

* make stdout and stderr non-destroyable (Igor Zinkovsky)

* fs: don't close uninitialized fs.watch handle (Ben Noordhuis)

* #2026 fix man page install on BSDs (Ben Noordhuis)

* #2040 fix unrecognized errno assert in uv_err_name

* #2043 fs: mkdir() should call callback if mode is omitted

* #2045 fs: fix fs.realpath on windows to return on error (Benjamin Pasero)

* #2047 minor cluster improvements

* #2052 readline get window columns correctly

* Upgrade V8 to 3.6.6.7


2011.11.04, Version 0.6.0 (stable), 865b077819a9271a29f982faaef99dc635b57fbc

* print undefined on undefined values in REPL (Nathan Rajlich)

Expand Down Expand Up @@ -60,7 +140,7 @@
* Documentation improvments (Igor Zinkovsky, Bert Belder, Ilya Dmitrichenko,
koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis)
* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis)

* Long process.title support (Ben Noordhuis)

Expand Down Expand Up @@ -316,7 +396,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

* Fixes https host header default port handling. (Mikeal Rogers)

* #1440 strip byte order marker when loading *.js and *.json files
* #1440 strip byte order marker when loading *.js and *.json files
(Ben Noordhuis)

* #1434 Improve util.format() compatibility with browser. (Koichi Kobayashi)
Expand Down Expand Up @@ -527,9 +607,9 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

* #829 Backport r8577 from V8 (Ben Noordhuis)

* #877 Don't wait for HTTP Agent socket pool to establish connections.
* #877 Don't wait for HTTP Agent socket pool to establish connections.

* #915 Find kqueue on FreeBSD correctly (Brett Kiefer)
* #915 Find kqueue on FreeBSD correctly (Brett Kiefer)

* #1085 HTTP: Fix race in abort/dispatch code (Stefan Rusu)

Expand Down Expand Up @@ -926,7 +1006,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

* HTTPS server

* Built in debugger 'node debug script.js'
* Built in debugger 'node debug script.js'

* realpath files during module load (Mihai Călin Bazon)

Expand Down Expand Up @@ -1068,7 +1148,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

* fs bugfixes (Tj Holowaychuk, Tobie Langel, Marco Rogers, isaacs)

* http bug fixes (Fedor Indutny, Mikeal Rogers)
* http bug fixes (Fedor Indutny, Mikeal Rogers)

* Faster buffers; breaks C++ API (Tim-Smart, Stéphan Kochen)

Expand Down Expand Up @@ -1237,7 +1317,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Upgrade http-parser, V8 to 2.2.21


2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78
2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78

* Datagram sockets (Paul Querna)

Expand Down Expand Up @@ -1343,7 +1423,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)

2010.05.06, Version 0.1.94, f711d5343b29d1e72e87107315708e40951a7826

* Look in /usr/local/lib/node for modules, so that there's a way
* Look in /usr/local/lib/node for modules, so that there's a way
to install modules globally (Issac Schlueter)

* SSL improvements (Rhys Jones, Paulo Matias)
Expand All @@ -1363,7 +1443,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Bugfix: destroy() instead of end() http connection at end of
pipeline

* Bugfix: http.Client may be prematurely released back to the
* Bugfix: http.Client may be prematurely released back to the
free pool. (Thomas Lee)

* Upgrade V8 to 2.2.8
Expand Down
9 changes: 8 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@ The externally maintained libraries used by Node are:
- lib/buffer_ieee754.js is copyright 2008 Fair Oaks Labs, Inc. and released
under the New BSD license.

- lib/punycode.js is copyright 2011 Ben Noordhuis and released under the MIT license.
- lib/punycode.js is copyright 2011 Mathias Bynens <http://mathiasbynens.be/>
and released under the MIT license.

- tools/gyp GYP is a meta-build system copyright 2009 Google Inc and
licensed under the three clause BSD license. See tools/gyp/LICENSE.

- deps/zlib copyright 1995-2010 Jean-loup Gailly and Mark Adler
licensed under a permissive free software license. See
deps/zlib/LICENSE.

- deps/npm NPM is a package manager program copyright 2009, 2010, 2011
Isaac Z. Schlueter and licensed under MIT. NPM includes several
subpackages MIT or Apache licenses, see deps/npm/LICENSE for more
information. NPM is included in the Node .msi and .pkg distributions
but not in the Node binary itself.
33 changes: 29 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ website_files = \
out/doc/favicon.ico \
out/doc/pipe.css

doc: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
doc docs: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)

$(apidoc_dirs):
mkdir -p $@
Expand Down Expand Up @@ -120,16 +120,36 @@ clean:

distclean: docclean
-find tools -name "*.pyc" | xargs rm -f
-rm -rf dist-osx
-rm -rf out/ node node_g

check:
@tools/waf-light check

VERSION=$(shell git describe)
VERSION=v$(shell python tools/getnodeversion.py)
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
PKG=out/$(TARNAME).pkg

packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker

#dist: doc/node.1 doc/api
dist: doc
dist: $(TARBALL) $(PKG)

PKGDIR=out/dist-osx

pkg: $(PKG)

$(PKG):
-rm -rf $(PKGDIR)
$(WAF) configure --prefix=/usr/local
DESTDIR=$(PKGDIR) $(WAF) install
$(packagemaker) \
--id "org.nodejs.NodeJS-$(VERSION)" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)

$(TARBALL): out/doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc
cp doc/node.1 $(TARNAME)/doc/node.1
Expand All @@ -140,6 +160,11 @@ dist: doc
rm -rf $(TARNAME)
gzip -f -9 $(TARNAME).tar

dist-upload: $(TARBALL) $(PKG)
ssh [email protected] mkdir -p web/nodejs.org/dist/$(VERSION)
scp $(TARBALL) [email protected]:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
scp $(PKG) [email protected]:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg

bench:
benchmark/http_simple_bench.sh

Expand All @@ -156,4 +181,4 @@ cpplint:

lint: jslint cpplint

.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install all program staticlib dynamiclib test test-all website-upload
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean dist-upload check uninstall install all program staticlib dynamiclib test test-all website-upload
3 changes: 2 additions & 1 deletion benchmark/http_simple_cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ var cluster = require('cluster');
var os = require('os');

if (cluster.isMaster) {
for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork();
console.log('master running on pid %d', process.pid);
for (var i = 1, n = os.cpus().length; i < n; ++i) cluster.fork();
} else {
require(__dirname + '/http_simple.js');
}
65 changes: 38 additions & 27 deletions benchmark/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,47 @@
* gcc -o iotest io.c
*/

#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

int tsize = 1000 * 1048576;
const char *path = "/tmp/wt.dat";
static int c = 0;
static int tsize = 1000 * 1048576;
static const char path[] = "/tmp/wt.dat";
static char buf[65536];

int c = 0;
static uint64_t now(void) {
struct timeval tv;

char* bufit(size_t l)
{
char *p = malloc(l);
memset(p, '!', l);
return p;
if (gettimeofday(&tv, NULL))
abort();

return tv.tv_sec * 1000000ULL + tv.tv_usec;
}

void writetest(int size, size_t bsize)
static void writetest(int size, size_t bsize)
{
int i;
char *buf = bufit(bsize);
struct timeval start, end;
uint64_t start, end;
double elapsed;
double mbps;

assert(bsize <= sizeof buf);

int fd = open(path, O_CREAT|O_WRONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}

assert(0 == gettimeofday(&start, NULL));
start = now();

for (i = 0; i < size; i += bsize) {
int rv = write(fd, buf, bsize);
if (c++ % 2000 == 0) fprintf(stderr, ".");
Expand All @@ -45,35 +51,40 @@ void writetest(int size, size_t bsize)
exit(254);
}
}
#ifdef __linux__
close(fd);

#ifndef NSYNC
# ifdef __linux__
fdatasync(fd);
#else
# else
fsync(fd);
#endif
close(fd);
assert(0 == gettimeofday(&end, NULL));
elapsed = (end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/100000.;
# endif
#endif /* SYNC */

end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "\nWrote %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);

free(buf);
fprintf(stderr, "\nWrote %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}

void readtest(int size, size_t bsize)
{
int i;
char *buf = bufit(bsize);
struct timeval start, end;
uint64_t start, end;
double elapsed;
double mbps;

assert(bsize <= sizeof buf);

int fd = open(path, O_RDONLY, 0644);
if (fd < 0) {
perror("open failed");
exit(254);
}

assert(0 == gettimeofday(&start, NULL));
start = now();

for (i = 0; i < size; i += bsize) {
int rv = read(fd, buf, bsize);
if (rv < 0) {
Expand All @@ -82,12 +93,12 @@ void readtest(int size, size_t bsize)
}
}
close(fd);
assert(0 == gettimeofday(&end, NULL));
elapsed = (end.tv_sec - start.tv_sec) + ((double)(end.tv_usec - start.tv_usec))/100000.;

end = now();
elapsed = (end - start) / 1e6;
mbps = ((tsize/elapsed)) / 1048576;
fprintf(stderr, "Read %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);

free(buf);
fprintf(stderr, "Read %d bytes in %03fs using %ld byte buffers: %03fmB/s\n", size, elapsed, bsize, mbps);
}

void cleanup() {
Expand Down
Loading

0 comments on commit 873877b

Please sign in to comment.