-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
a2080f2
commit a57fc3f
Showing
12 changed files
with
132 additions
and
5,075 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,3 @@ | ||
node_modules/ | ||
.eslintcache | ||
*.log |
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,28 @@ | ||
'use strict'; | ||
|
||
var db; | ||
var onStart = function() { | ||
db = new Dexie('Database'); | ||
db.version(1).stores({ people: '++id, firstname, lastname, age' }); | ||
db.open(); | ||
}; | ||
|
||
var onComplete = function() { | ||
db.delete(); | ||
}; | ||
|
||
var benchmarkOptions = { | ||
defer: true, | ||
onStart: onStart, | ||
onComplete: onComplete | ||
}; | ||
|
||
suite('querying', function() { | ||
benchmark('all', function(deferred) { | ||
db.collection('people').find({}).toArray().then(()=> { deferred.resolve() }); | ||
}, benchmarkOptions); | ||
|
||
benchmark('findOne', function(deferred) { | ||
db.collection('people').findOne({}).then(()=> { deferred.resolve() }); | ||
}, benchmarkOptions); | ||
}); |
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,29 @@ | ||
module.exports = function(config) { | ||
const configuration = { | ||
basePath: './', | ||
frameworks: [ | ||
'benchmark' | ||
], | ||
reporters: [ | ||
'benchmark' | ||
], | ||
|
||
files: [ | ||
'src/*.js', | ||
'benchmarks/*.js' | ||
], | ||
port: 9876, | ||
captureTimeout: 10 * 1000, | ||
browserNoActivityTimeout: 10 * 60 * 1000, | ||
colors: true, | ||
browsers: ['Chrome'], | ||
concurrency: Infinity, | ||
plugins: [ | ||
'karma-benchmark', | ||
'karma-benchmark-reporter', | ||
'karma-chrome-launcher' | ||
] | ||
}; | ||
|
||
config.set(configuration); | ||
}; |
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,32 @@ | ||
module.exports = function(config) { | ||
const configuration = { | ||
basePath: './', | ||
frameworks: [ | ||
'jasmine', | ||
'jasmine-matchers' | ||
], | ||
reporters: [ | ||
'mocha' | ||
], | ||
|
||
files: [ | ||
'src/*.js', | ||
'tests/spec/**/*.js' | ||
], | ||
|
||
port: 9876, | ||
captureTimeout: 10 * 1000, | ||
browserNoActivityTimeout: 10 * 60 * 1000, | ||
colors: true, | ||
browsers: ['Chrome'], | ||
concurrency: Infinity, | ||
plugins: [ | ||
'karma-jasmine', | ||
'karma-jasmine-matchers', | ||
'karma-mocha-reporter', | ||
'karma-chrome-launcher' | ||
] | ||
}; | ||
|
||
config.set(configuration); | ||
}; |
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,40 @@ | ||
{ | ||
"name": "Dexie-mongoify", | ||
"version": "1.1.0", | ||
"description": "Dexie.js plugin with MongoDB-like API", | ||
"author": { | ||
"name": "Yuri Solovyov" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/YuriSolovyov/Dexie-mongoify" | ||
}, | ||
|
||
"scripts": { | ||
"test": "node_modules/.bin/karma start karma-test.conf.js --single-run --browsers Chrome", | ||
"bench": "node_modules/.bin/karma start karma-bench.conf.js --single-run --browsers Chrome", | ||
"bench:debug": "node_modules/.bin/karma start karma-bench.conf.js --browsers Chrome" | ||
}, | ||
"keywords": [ | ||
"mongo", | ||
"indexeddb", | ||
"dexie" | ||
], | ||
|
||
"engines": { | ||
"node": ">=4.2 <5.0" | ||
}, | ||
|
||
"devDependencies": { | ||
"jasmine-core": "^2.3.4", | ||
"benchmark": "^2.1.0", | ||
"karma": "^0.13.19", | ||
"karma-jasmine": "^0.3.6", | ||
"karma-jasmine-matchers": "^0.1.3", | ||
"karma-mocha-reporter": "^1.1.5", | ||
"karma-chrome-launcher": "^0.2.2", | ||
"karma-benchmark": "git+https://github.com/lazd/karma-benchmark.git", | ||
"karma-benchmark-reporter": "git+https://github.com/lazd/karma-benchmark-reporter.git" | ||
}, | ||
"license": "MIT" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.