不要怂,就是干,撸起袖子干!

Commit e4f870d1 by Sascha Depold

performance example

1 parent 3b4f56b7
Showing with 3 additions and 1 deletions
...@@ -9,7 +9,7 @@ Person.sync({force: true}).on('success', function() { ...@@ -9,7 +9,7 @@ Person.sync({force: true}).on('success', function() {
var start = Date.now() var start = Date.now()
, count = 10000 , count = 10000
, offset = 0 , offset = 0
, stepWidth = 100 , stepWidth = 50
, queries = [] , queries = []
, chainer = new QueryChainer , chainer = new QueryChainer
...@@ -27,6 +27,8 @@ Person.sync({force: true}).on('success', function() { ...@@ -27,6 +27,8 @@ Person.sync({force: true}).on('success', function() {
console.log("Saving " + count + " items took: " + (Date.now() - start) + "ms") console.log("Saving " + count + " items took: " + (Date.now() - start) + "ms")
cb && cb.call() cb && cb.call()
} }
}).on('failure', function(err) {
console.log(err)
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!