🤤 Drool is an automation layer that is used to measure if a set of "clean" actions results in a DOM and or Listener leak.
Last updated 3 years ago by artemv .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @artemv/drool 
SYNC missed versions from official npm registry.

???? 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.


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.


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'

  repeatCount: 100,
  setup: function() {
  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();
  assert: function(after, initial) {
    assert.equal(initial.counts.nodes, after.counts.nodes, 'node count should match');
}, driver)
.then(() => driver.quit())
.catch(e => {
  throw e;

View the API Docs

Current Tags

  • 0.6.1                                ...           latest (3 years ago)

2 Versions

  • 0.6.1                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |