- MacBook Pro (Retina, 15-inch, Late 2013)
- Yosemite 10.10.5
- basic-updates 200 iterations
- 243758c51f6ee906af0d4821fe891577058cab6b vs 4.0.0
safari 9.0
before: 24867ms after: 17232ms
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mocha Tests</title> | |
<link rel="stylesheet" href="./mocha.css" /> | |
<script src="./mocha.js"></script> | |
<script> | |
mocha.setup('bdd'); | |
</script> |
safari 9.0
before: 24867ms after: 17232ms
it('update_seq persists', function(start) { | |
var name = testHelpers.name; | |
testUtils.initTestDB(name, function(err, db) { | |
db.post({test:"somestuff"}, function (err, info) { | |
new PouchDB(name, function(err, db) { | |
db.info(function(err, info) { | |
equal(info.doc_count, 2, 'Doc Count persists'); // should be 1 | |
start(); | |
}); | |
}); |
#!/usr/bin/env python | |
# | |
# Prints the pouchdb.min.js and gzipped file sizes for | |
# all PouchDB builds in the past several months. | |
# | |
import requests, zlib | |
def main(): | |
print 'Commit','GitHub link','Date','pouchdb.min.js size','gzipped size' |
it('should handle user errors in reduce functions', function () { | |
return new Pouch(dbName).then(function (db) { | |
function getKey(row) {return row.key; } | |
db.on('error', function () { /* noop */ }); | |
return createView(db, { | |
map : function (doc) { | |
emit(doc.name, doc.data); | |
}, | |
reduce : function (keys, values) { | |
return values[0].foo.bar; |
var start = document.getElementById('start'); | |
var stuff = document.getElementById('stuff'); | |
var remote = new PouchDB('http://registry.npmjs.org/', {cache: true}); | |
var local = new PouchDB('npm'); | |
start.addEventListener('click', function (){ | |
remote.info().then(function (a) { | |
return a.doc_count; | |
}).then(function (count) { | |
remote.replicate.to(local, { | |
batch_size: 100 |
openDatabase('mydatabase', 1, 'mydatabase', 5000000, function (db) { | |
function onTransactionSuccess() { | |
console.log('yay, transaction succeeded!'); | |
} | |
function onTransactionError() { | |
console.log('boo, transaction failed!'); | |
} | |
db.transaction(function (tx) { |