Skip to content

Commit f8c0234

Browse files
committed
genesis
0 parents  commit f8c0234

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/build
2+
/node_modules
3+
*~
4+

Makefile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
TESTS = test/*.js
2+
3+
all: build
4+
5+
build: clean configure compile
6+
7+
configure:
8+
node-waf configure
9+
10+
compile:
11+
node-waf build
12+
13+
clean:
14+
#rm -f bcrypt_lib.node
15+
rm -Rf build
16+
17+
18+
.PHONY: clean test build

include.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./build/Release/gcstats');

package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "gcstats",
3+
"description": "Get some data about how V8's GC is behaving within your node program .",
4+
"version": "0.0.1",
5+
"author": "Lloyd Hilaiel (http://lloyd.io)",
6+
"engines": { "node": ">= 0.6.0" },
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/lloydncb000gt/gcstats.git"
10+
},
11+
"licenses": [ { "type": "wtfpl" } ],
12+
"bugs": {
13+
"url" : "https://github.com/lloyd/gcstats/issues"
14+
},
15+
"scripts": {
16+
"install": "make build"
17+
},
18+
"contributors": [
19+
]
20+
}

src/gcstats.cc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* 2012 - lloyd - do what the fuck you want to
3+
*/
4+
5+
6+
#include <node.h>
7+
#include <node_version.h>
8+
9+
#include <string>
10+
#include <cstring>
11+
12+
using namespace v8;
13+
using namespace node;
14+
15+
Handle<Value> meh(const Arguments& args) {
16+
HandleScope scope;
17+
return Integer::New(7);
18+
}
19+
20+
extern "C" void init(Handle<Object> target) {
21+
HandleScope scope;
22+
NODE_SET_METHOD(target, "meh", meh);
23+
};

wscript

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- mode: python -*-
2+
3+
import Options, Utils, sys
4+
5+
srcdir = "."
6+
blddir = "build"
7+
VERSION = "0.0.1"
8+
9+
def set_options(opt):
10+
opt.tool_options("compiler_cxx")
11+
opt.tool_options("compiler_cc")
12+
13+
def configure(conf):
14+
conf.check_tool("compiler_cxx")
15+
conf.check_tool("compiler_cc")
16+
conf.check_tool("node_addon")
17+
o = Options.options
18+
19+
libpath = ['/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib', '/usr/sfw/lib']
20+
includes = ['/usr/include', '/usr/includes', '/usr/local/includes', '/opt/local/includes', '/usr/sfw/lib'];
21+
22+
def build(bld):
23+
gcstats = bld.new_task_gen("cxx", "shlib", "node_addon")
24+
gcstats.cxxflags = [ "-O3" ]
25+
gcstats.target = "gcstats"
26+
gcstats.source = """
27+
src/gcstats.cc
28+
"""
29+
30+
def test(t):
31+
Utils.exec_command('make test')

0 commit comments

Comments
 (0)