forked from deepak1556/node-memwatch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f8c0234
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/build | ||
/node_modules | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
TESTS = test/*.js | ||
|
||
all: build | ||
|
||
build: clean configure compile | ||
|
||
configure: | ||
node-waf configure | ||
|
||
compile: | ||
node-waf build | ||
|
||
clean: | ||
#rm -f bcrypt_lib.node | ||
rm -Rf build | ||
|
||
|
||
.PHONY: clean test build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./build/Release/gcstats'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "gcstats", | ||
"description": "Get some data about how V8's GC is behaving within your node program .", | ||
"version": "0.0.1", | ||
"author": "Lloyd Hilaiel (http://lloyd.io)", | ||
"engines": { "node": ">= 0.6.0" }, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/lloydncb000gt/gcstats.git" | ||
}, | ||
"licenses": [ { "type": "wtfpl" } ], | ||
"bugs": { | ||
"url" : "https://github.com/lloyd/gcstats/issues" | ||
}, | ||
"scripts": { | ||
"install": "make build" | ||
}, | ||
"contributors": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* 2012 - lloyd - do what the fuck you want to | ||
*/ | ||
|
||
|
||
#include <node.h> | ||
#include <node_version.h> | ||
|
||
#include <string> | ||
#include <cstring> | ||
|
||
using namespace v8; | ||
using namespace node; | ||
|
||
Handle<Value> meh(const Arguments& args) { | ||
HandleScope scope; | ||
return Integer::New(7); | ||
} | ||
|
||
extern "C" void init(Handle<Object> target) { | ||
HandleScope scope; | ||
NODE_SET_METHOD(target, "meh", meh); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- mode: python -*- | ||
|
||
import Options, Utils, sys | ||
|
||
srcdir = "." | ||
blddir = "build" | ||
VERSION = "0.0.1" | ||
|
||
def set_options(opt): | ||
opt.tool_options("compiler_cxx") | ||
opt.tool_options("compiler_cc") | ||
|
||
def configure(conf): | ||
conf.check_tool("compiler_cxx") | ||
conf.check_tool("compiler_cc") | ||
conf.check_tool("node_addon") | ||
o = Options.options | ||
|
||
libpath = ['/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib', '/usr/sfw/lib'] | ||
includes = ['/usr/include', '/usr/includes', '/usr/local/includes', '/opt/local/includes', '/usr/sfw/lib']; | ||
|
||
def build(bld): | ||
gcstats = bld.new_task_gen("cxx", "shlib", "node_addon") | ||
gcstats.cxxflags = [ "-O3" ] | ||
gcstats.target = "gcstats" | ||
gcstats.source = """ | ||
src/gcstats.cc | ||
""" | ||
|
||
def test(t): | ||
Utils.exec_command('make test') |