• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    JavaScript
  • Created almost 12 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BDD style memory leak hunting tool

memdiff Build Status

BDD style memory leak hunting tool. See example/simple.js

Warning

Memdiff is experimental. I've been noticing some inconsistency, haven't had time for checking out and fixing yet.

Install

$ npm install -g memdiff

Requires Node v0.8.x

Usage

$ memdiff --help

Example Module

// example/simple.js
function SimpleClass(){}

var leaks = [];

describe('SimpleClass', function(){

  it('is leaking', function(){
    leaks.push(new SimpleClass);
  });


  it('is async and not leaking', function(done){
    new SimpleClass;

    process.nextTick(done);
  });

});

API

var memdiff = require('memdiff');

function SimpleClass(){}

var leaks = [];

function leaking(){
  leaks.push(new SimpleClass);
}

memdiff(leaking, function(result){ // or memdiff({ fn: leaking, duration: 15, times: 9999, interval: 1 ....
  console.log('leaking: ', result.size);
});

More Repositories

1

boxcars-archived

Easy-to-configure Static Web & Reverse Proxy Server in Go
Go
625
star
2

kaktus

Experimental web browser with minimalistic design
JavaScript
417
star
3

prova

Test runner based on Tape and Browserify
JavaScript
334
star
4

crud

Relational database library for SQL databases & Go.
Go
311
star
5

go-makefile-example

Example Makefile for Go projects
Makefile
265
star
6

emacs

Ready-to-use Emacs Setup for JavaScript and Go
Emacs Lisp
226
star
7

atlas

DEPRECATED: I'm using labstack/echo now.
Go
181
star
8

logger

Minimalistic logging library for Go.
Go
158
star
9

yolo

File watcher with web UI.
Go
133
star
10

alert

JavaScript library to play sound alerts
JavaScript
111
star
11

mao

Pragmatic BDD Testing Framework For Go
Go
102
star
12

shell-jobs

Human-friendly Cron replacement in NodeJS
JavaScript
96
star
13

english-time

Parses times written in simple English to unix time.
JavaScript
88
star
14

relative-date

Javascript module for outputting relative dates.
JavaScript
81
star
15

functools

DEPRECATED: Use small modules instead
JavaScript
79
star
16

radio-paradise

Radio Paradise Client made with Elm and Go
JavaScript
76
star
17

play-audio

Lightweight Wrapper For HTML5 Audio API
JavaScript
70
star
18

developers-in-turkey

A list of Turkish provinces by the count of software developers.
JavaScript
66
star
19

lowkick

simplifies running javascript tests on varied environments, from command-line.
JavaScript
61
star
20

watch-array

Lets you subscribe to any changes on native JavaScript arrays.
JavaScript
59
star
21

distractions

A command-line tool to define distracting websites and turn them on/off when needed.
Shell
58
star
22

prova-retired

RETIRED Check out http://github.com/azer/prova
JavaScript
57
star
23

personal-api

NodeJS API server to publish personal info.
JavaScript
49
star
24

declarative-js

Declarative async programming with JavaScript
JavaScript
49
star
25

door

Minimalistic HTTP proxy server with config auto-reloading and static file serving.
JavaScript
47
star
26

indexeddb

Well-tested, low-level wrapper around the IndexedDB API. It can sync locally and remotely.
TypeScript
45
star
27

homepage

My personal website
JavaScript
39
star
28

html-patcher

Virtual DOM Diff & Patch with HTML Templates
JavaScript
35
star
29

environ

Cross-platform environment detection library for JavaScript
JavaScript
32
star
30

miso-emacs

Opinionated Emacs distro for minimalists.
Emacs Lisp
32
star
31

ourtunes

Roll your music player in a few minutes, with single command.
JavaScript
31
star
32

jsbuild

JSBuild is a command-line utility that provides building CommonJS modules and packages for web
Python
30
star
33

observer

CommonJS Implementation of the Observer Pattern
JavaScript
29
star
34

prettify-error

Prettify given error objects for console outputs
JavaScript
29
star
35

js-yasnippets

OUT OF DATE
28
star
36

.w3

A Google Chrome extension that executes JavaScript and CSS files in ~/.w3
D
27
star
37

debug

Tiny Debugging Tool For Golang
Go
27
star
38

get-object-path

Return the value at given object path.
JavaScript
23
star
39

toledo-chess

Unobtrusive, indented fork of Oscar Toledo's Javascript Chess
JavaScript
21
star
40

npm.el

Create and rule NPM packages from Emacs
Emacs Lisp
21
star
41

go-preact-starter

Starter for combining Go and Preact in any web project.
Go
20
star
42

play-url

Unified API for playing Youtube, Rdio, SoundCloud and Mp3 URLs.
JavaScript
19
star
43

remotely

Run given command remotely via SSH
JavaScript
18
star
44

new-list

Array-like objects with PubSub interfaces that you can subscribe to changes.
JavaScript
17
star
45

new-struct

Structs inspred from Golang
JavaScript
17
star
46

strip

Strip HTML Tags
JavaScript
17
star
47

gezi

Gezi Web Browser
JavaScript
17
star
48

render-loop

Async DOM render loop with Virtual DOM diffing
JavaScript
16
star
49

with-env

Read and apply .env file (if exists) in the working directory.
JavaScript
16
star
50

node-eksi-sozluk

NodeJS client to query Eksi Sozluk
JavaScript
16
star
51

javascript-guide

Azer's JavaScript Guide
16
star
52

measure-time

create benchmark suites and see the time consumption per given functions.
JavaScript
15
star
53

highkick

HighKick is a small testing framework that I like.
JavaScript
15
star
54

indexhtml

Generate a customized index.html file
JavaScript
15
star
55

juxt.js

Take a set of functions, return a function that is the juxtaposition of those functions.
JavaScript
14
star
56

7min.io

7min Workout App
JavaScript
13
star
57

pubsub

Minimalistic Pubsub Implementation
JavaScript
13
star
58

turkish-dictionary-api

API Server for the official Turkish-to-turkish dictionary by TDK
JavaScript
12
star
59

dotfiles

my dotfiles
Emacs Lisp
12
star
60

snakecase

Go library for converting given string to snake case
Go
12
star
61

subscription

NodeJS library to simplify paid subscriptions with Stripe and LevelDB.
JavaScript
11
star
62

new-chain

Create chaining APIs from functions
JavaScript
11
star
63

virtual-glue

Render HTML with Hyperglue and VirtualDOM
JavaScript
11
star
64

go-choo-starter

Starter for choo projects with Go backend.
Go
10
star
65

run-after

Run a command after given time based on english-time
Ruby
10
star
66

format-text

String formatting library inspired from Python
JavaScript
10
star
67

ethereum-tipping-wallet

Chrome extension for tipping websites with Ethereum
TypeScript
10
star
68

style-format

Library to easily style texts with string formatting.
JavaScript
10
star
69

go-style

Console styling library for Golang
Go
10
star
70

redux-starter

Hek Module for Redux
JavaScript
10
star
71

remote-control

Run remote commands in a web page via HTTP requests.
JavaScript
10
star
72

require-sdk

JavaScript library for making sure given SDK is loaded and executed. Designed for popular APIs like Youtube, Rdio, Soundcloud etc.
JavaScript
9
star
73

afrikaradyo.com

JavaScript
9
star
74

after-time

Declarative setTimeout
JavaScript
8
star
75

expand-home-dir

Expand ~/
JavaScript
8
star
76

scrape-url

Scrape URLs with CSS selectors
JavaScript
8
star
77

new-object

Objects that you can subscribe to changes.
JavaScript
8
star
78

new-command

Simplifies creating CLI programs by combining minimist, show-help, show-version modules.
JavaScript
8
star
79

flat-glob

Return glob applied, flattened and duplicate filtered version of the given list of filenames
JavaScript
8
star
80

concat

Concatenate files
JavaScript
7
star
81

right-pad

string right pad
JavaScript
7
star
82

attr

Observable Attributes
JavaScript
7
star
83

roka

High-level styling library for React
TypeScript
7
star
84

title-from-url

Generate a title from given URL
JavaScript
7
star
85

styled

console styling library
JavaScript
7
star
86

domloader

JavaScript
7
star
87

genpkg

Generate NodeJS Packages from JavaScript files
JavaScript
7
star
88

next-time

Returns the nearest date of given time
JavaScript
7
star
89

chessboard

Pure HTML&XSLT Chess Board with FEN Support
6
star
90

logger-slack-hook

Slack hook for logger library
Go
6
star
91

memoize-async

Async Function Memoizer
JavaScript
6
star
92

deprecated-roka

[deprecated] A new javascript framework targeting modern web/javascript engines
JavaScript
6
star
93

anglicize

Anglicize the special characters in given text
JavaScript
6
star
94

urls

URL Library for Kaktüs
JavaScript
6
star
95

delicious-surf

a web browser for better bookmarking
C
6
star
96

duba

CLI tool for managing multiple remote and local workspaces using SSH
JavaScript
5
star
97

elm-ui-styles

UI Library for Elm, inspired by Tachyons.
Elm
5
star
98

anakaynak.com

anakaynak.com source code
JavaScript
5
star
99

flatten-array

Flattens nested arrays.
JavaScript
5
star
100

vimfiles

My VIM Configuration Files
Vim Script
5
star