• Stars
    star
    1,482
  • Rank 31,713 (Top 0.7 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated about 6 years ago

Reviews

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

Repository Details

Automated memory leak detection and analysis

🤤 Drool is an automation layer that is used to measure if a set of "clean" actions results in a DOM and or Listener leak.

View the API Docs

Build Status Join the chat at https://gitter.im/samccone/drool


Real World wins

Drool has made it far easier to identify memory leaks in an automated and reproducible way, for example:

Why am I making this?

After running perf/memory tests across multiple todomvc implementations, I found that almost all implementations have significant memory leaks on the most basic of tasks. Worse yet, most of these leaks were introduced at a framework level, or were introduced by "expert/(framework authors)". The question arose in my mind, if people who authored a framework are introducing leaks in the most trivial of applications, how can users be expected to create non-leaking implementations of much more complex applications.

Goals

Ideally Drool will leverage standard interfaces, such as todomvc, to test for leaks at a framework level. The result of which should help framework authors and developers realize that memory leaks are pervasive in the tools that we use.

Chrome devtools is a powerful utility layer for detecting memory issues, yet the fact still stands that most developers do not know how to use the tooling around it to arrive any thing that is directly actionable. Drool aims to be a generic automated abstraction layer, so people can get good "numbers" in a consistent way without having to deep dive into memory profiling.

Running

Ensure that you have at least version 2.26.436421 of chromedriver.

var drool = require('drool');
var assert = require('assert');

var driver = drool.start({
  chromeOptions: 'no-sandbox'
});

drool.flow({
  repeatCount: 100,
  setup: function() {
    driver.get('http://todomvc.com/examples/backbone/');
  },
  action: function() {
    driver.findElement(drool.webdriver.By.css('.new-todo')).sendKeys('find magical goats', drool.webdriver.Key.ENTER);
    driver.findElement(drool.webdriver.By.css('.todo-list li')).click();
    driver.findElement(drool.webdriver.By.css('.destroy')).click();
  },
  assert: function(after, initial) {
    assert.equal(initial.counts.nodes, after.counts.nodes, 'node count should match');
  }
}, driver)
.then(() => driver.quit())
.catch(e => {
  driver.quit();
  throw e;
})

View the API Docs

More Repositories

1

bundle-buddy

A tool to understand your bundle size and why files are in your bundle
TypeScript
2,891
star
2

The-cost-of-transpiling-es2015-in-2016

Investigating the overhead cost of compiled es2015
JavaScript
1,343
star
3

coverage-ext

Generate code coverage for any webpage
JavaScript
424
star
4

fidgetspin.xyz

TypeScript
298
star
5

noise

🔈 Recreating the dialup modem in JS
JavaScript
148
star
6

scrollin

📜 A leak free performance focused scroll util
JavaScript
122
star
7

thermal_print

webusb esc/pos thermal printer driver
TypeScript
102
star
8

issue-and-pr-templates

✨ Issue and PR templates! ✨
85
star
9

moji-brush

https://www.mojibrush.co
JavaScript
67
star
10

marionette-behaviors

a collection of useful marionette behaviors
CoffeeScript
64
star
11

webcomponent-bundle-analyzer

Analyze where your web component bundle bloat is coming from!
JavaScript
59
star
12

ivy

JavaScript
58
star
13

paper-typeahead

A typeahead polymer element, using material design
JavaScript
41
star
14

promise-semaphore

promise semaphore
JavaScript
30
star
15

edit.sx-frontend

the front end app for edit.sx
CSS
30
star
16

headless-snap

JavaScript
24
star
17

polymer-marionette

Marionette and Polymer meet!
CSS
22
star
18

dogesay

http://dogesay.com/wow
CoffeeScript
22
star
19

engine-deps

install dependencies based on node version
JavaScript
20
star
20

css-diff

diff your Css Stylus and Scss
JavaScript
20
star
21

monocle

a tool for watching things
JavaScript
17
star
22

365

sketch a day
JavaScript
14
star
23

pieChart

pieChart
JavaScript
12
star
24

travis-sauce-connect

A pattern repo for running sauce-connect on travis.ci
JavaScript
10
star
25

lcdsysinfo

lcdsysinfo web usb driver
TypeScript
10
star
26

marionette-browserify

sample project for how to use backbone.marionette within the ever popular browserify
JavaScript
9
star
27

tiny-games

JavaScript
7
star
28

light-paint

CoffeeScript
7
star
29

marionette-2.4-demos

JavaScript
7
star
30

testing-h2-push

HTML
7
star
31

infestor

Inject content into your server responses
JavaScript
7
star
32

angular-samples

angular fundamentals
JavaScript
6
star
33

streaming-css

HTML
6
star
34

wavesvg

wavesvg
CoffeeScript
6
star
35

grifter

TypeScript
5
star
36

twinkie

A polymer(1)&&(2) template parser + interface printer
TypeScript
5
star
37

hub-bot

automate OSS review churn
JavaScript
4
star
38

dr_mojo

JavaScript
4
star
39

White-Board

a socket.io html5 white board for real time collaboration
JavaScript
4
star
40

perf.html

JavaScript
4
star
41

weathers

node.js weather wrapper
JavaScript
4
star
42

house-hunt-api

CoffeeScript
4
star
43

strands

4
star
44

polymer-drool

JavaScript
3
star
45

pollster

TypeScript
3
star
46

CircleUI

babies cry when they use this
JavaScript
3
star
47

digital-doodles

digital doodles
CoffeeScript
3
star
48

rap-air-horn

android rap airhorn
Java
3
star
49

magnets

realtime fridge magnets
JavaScript
3
star
50

yaml-validate

get validating
JavaScript
3
star
51

webkit-remote-debugger-translator

JavaScript
3
star
52

psd.js

Mirror of Meltingice's CoffeeScript PDF parser library.
CoffeeScript
3
star
53

chroma

chroma key in html5
JavaScript
2
star
54

jsconf-2015-stream

jsconf-2015-stream
JavaScript
2
star
55

Docker-Firefox-node.js-webdriver-base

Shell
2
star
56

node_demo

JavaScript
2
star
57

multi-select-order

multiple select ordering
2
star
58

pebble-run

C
2
star
59

goat-swipe

like tinder but for goats
Objective-C
2
star
60

psdgrade

psdgrade
JavaScript
2
star
61

jquery.metal

more metal for your site
JavaScript
2
star
62

clojure-snake

a snake clone written in clojure
Clojure
2
star
63

trace

TypeScript
2
star
64

Blog-Posts

1
star
65

baudot-code-to-string

JavaScript
1
star
66

ios-trashcan

Objective-C
1
star
67

fieri_compress

HTML
1
star
68

roots-asset-expand

CoffeeScript
1
star
69

char-to-baudot

char to Baudot-Murray code lookup
JavaScript
1
star
70

SE-menu-toggle

make the menus on your SE site toggle
JavaScript
1
star
71

home-hunt

CSS
1
star
72

SE_menuFade

JavaScript
1
star
73

me

HTML
1
star
74

argumentParser

JavaScript
1
star
75

shootit

JavaScript
1
star
76

browserify-global-lookup-shim

JavaScript
1
star
77

samsaccone.com

samsaccone.com
1
star
78

lazer-space-goat

TypeScript
1
star
79

string-to-baudot-code

JavaScript
1
star
80

billTracker

Ruby
1
star
81

ansi-stream

an ansi to html parser
JavaScript
1
star
82

TID_workshop_2013

CoffeeScript
1
star
83

transit

A realtime feed of all the buses in Boston
JavaScript
1
star
84

behave-ui-hotkeys

A hotkeys Marionette Behavior
JavaScript
1
star
85

dogestyle

1
star
86

marionette-testing

JavaScript
1
star
87

timeline-grid

JavaScript
1
star
88

string-to-binary

JavaScript
1
star
89

pixl

http://pixl.jit.su/
CoffeeScript
1
star
90

testing-the-dom

JavaScript
1
star
91

joey

HTML
1
star
92

sveltekit-388

Svelte
1
star
93

unwrap

unwrap UMD
JavaScript
1
star
94

rtc-sample

rtc-sample
JavaScript
1
star
95

fried-twinkie

TypeScript
1
star
96

phpPhoto

A Databaseless Photo Website Template
PHP
1
star
97

sno-country

snocountry node api wrapper
JavaScript
1
star
98

wordpress-to-tumblr

nodejs wordpress-to-tumblr importer
CoffeeScript
1
star
99

home-energy-score-api

API interface for the HES SOAP based API.
CoffeeScript
1
star
100

engine-fail

JavaScript
1
star