Skip to content

Instantly share code, notes, and snippets.

Ry Dahl ry

Block or report user

Report or block ry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple.txt
# ab -t 30 -c 100 http://localhost:8000/bytes/123 | grep Req
## v0.7.12-9-gc10e412
Requests per second: 7404.23 [#/sec] (mean)
Requests per second:    7419.61 [#/sec] (mean)
Requests per second: 7421.72 [#/sec] (mean)
## v0.6.19-7-gdd1c3d7
View spdy-install-problem
ryan@ryan-ThinkPad-X201:~/src/example% node -v
v0.7.12-pre
ryan@ryan-ThinkPad-X201:~/src/example% npm -v
1.1.26
ryan@ryan-ThinkPad-X201:~/src/example% pwd
/home/ryan/src/example
ryan@ryan-ThinkPad-X201:~/src/example% npm install spdy
spdy@1.2.0 node_modules/spdy
ryan@ryan-ThinkPad-X201:~/src/example% ls
node_modules
View looks-good.txt
## master with v8 3.11.10
% ab -t 30 -c 100 http://localhost:8000/bytes/123 | grep Req
Requests per second: 7394.90 [#/sec] (mean)
Requests per second: 7446.95 [#/sec] (mean)
Requests per second: 7570.16 [#/sec] (mean)
## Node v0.6.18
View three-down-nine-to-go.txt
% ldd ~/local/node-v0.6.18/bin/node | wc -l
12
% ldd ~/local/node-v0.6.18/bin/node
linux-vdso.so.1 => (0x00007fff5b3ff000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f127a099000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1279e90000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f1279c34000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f127986c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1279667000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1279367000)
View .Xresources
XTerm*utf8: 1
XTerm*faceName: DejaVu Sans Mono
XTerm*faceSize: 13
XTerm*background: #000000
XTerm*foreground: #aaaaaa
XTerm*metaSendsEscape: true
XTerm*colorBD: #ffffff
XTerm*colorBDMode: true
XTerm*cursorBlink: false
XTerm*cursorColor: #bbbbcc
View 0001-Add-no_idle_notification.patch
From c4b230876f7e3e5cfc2015342af77a5960b001c3 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <ry@tinyclouds.org>
Date: Thu, 22 Mar 2012 15:41:11 -0700
Subject: [PATCH] Add --no_idle_notification
Will result in less aggressive GC - but probably less CPU.
---
src/node.cc | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
@ry
ry / fib.js
Created Mar 12, 2012
a proper fibonacci server in node. it will light up all your cores.
View fib.js
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
}
View 0001-Potential-fix-for-2473.patch
From fcd7494f7e5d4ad41e1e7e0fc37f4076ae0f3439 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <ry@tinyclouds.org>
Date: Mon, 9 Jan 2012 15:29:15 -0800
Subject: [PATCH] Potential fix for #2473
---
src/node_buffer.h | 3 +--
src/stream_wrap.cc | 14 +++++++++-----
2 files changed, 10 insertions(+), 7 deletions(-)
View 0001-Potential-fix-for-2473.patch
From 86047eb702c7be207a4bd35e044b8d83621ce448 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <ry@tinyclouds.org>
Date: Mon, 9 Jan 2012 15:29:15 -0800
Subject: [PATCH] Potential fix for #2473
---
src/node_buffer.h | 3 +--
src/stream_wrap.cc | 14 +++++++++-----
2 files changed, 10 insertions(+), 7 deletions(-)
View slab.diff
diff --git a/src/node_buffer.h b/src/node_buffer.h
index ea33112..ef7cf4f 100644
--- a/src/node_buffer.h
+++ b/src/node_buffer.h
@@ -65,6 +65,7 @@ namespace node {
class NODE_EXTERN Buffer: public ObjectWrap {
public:
+ static v8::Persistent<v8::FunctionTemplate> constructor_template;
You can’t perform that action at this time.