Permalink
Browse files

Remove the old sandbox test file, it's not part of the distribution.

  • Loading branch information...
1 parent 9e65562 commit 9ff2cf4fb153926789f62704e2d7259f100f058f @creationix committed Jul 13, 2010
Showing with 1 addition and 87 deletions.
  1. +0 −1 data/.gitignore
  2. +1 −1 package.json
  3. +0 −85 test.js
View
@@ -1 +0,0 @@
-*
View
@@ -4,5 +4,5 @@
"keywords": ["nosql", "database"],
"main" : "./lib/nstore",
"author": "Tim Caswell <tim@creationix.com>",
- "version": "0.1.1"
+ "version": "0.1.2"
}
View
85 test.js
@@ -1,85 +0,0 @@
-var sys = require('sys'),
- nStore = require('./lib/nstore'),
- Step = require('step');
-
-checkRam("Startup");
-var users = new nStore("data/users.db");
-checkRam("After loading db with " + users.length + " documents");
-
-function checkRam(message) {
- // sys.puts(message + ":\n" + sys.inspect(process.memoryUsage()));
-}
-function p(val) {
- sys.error(sys.inspect(val));
-}
-
-users.save(1, {name:"Tim Caswell",age:28}, function (err) {
- if (err) throw err;
- sys.debug("Saved");
- users.get(1, function (err, doc, meta) {
- if (err) throw err;
- sys.debug("Loaded");
- p([doc, meta]);
- users.remove(1, function (err) {
- if (err) throw err;
- sys.debug("Deleted");
-
- });
- });
-});
-
-// users.get(2, p);
-//
-// users.save(1, {hello:"World1"});
-// users.save(2, {hello:"World2"});
-// users.save(3, {hello:"World3"});
-
-// var num = 1000000;
-// var left = num;
-// function insert() {
-// if (left > 0) {
-// var counter = 1000;
-// left -= counter;
-// for (var i = 0; i < counter; i++) {
-// users.save(i, {hello: "world"}, function () {
-// counter--;
-// if (counter === 0) {
-// insert();
-// }
-// });
-// }
-// } else {
-// checkRam("After queueing " + num + " inserts");
-// }
-// }
-// insert();
-
-process.addListener("exit", function () {
- checkRam("On Exit");
-});
-//
-// // Step(
-// // function () {
-// // var num = 10;
-// // sys.puts("Inserting " + num + " documents");
-// // var group = this.group();
-// // for (var i = 0; i < num; i++) {
-// // users.save(null, {name: "Tim"+i,age:28}, group());
-// // }
-// // },
-// // function (err, results) {
-// // sys.puts("Done Inserting");
-// // sys.puts("Retrieving all documents...");
-// // var data = [];
-// // var all = users.stream();
-// // all.addListener('data', function (doc) {
-// // data.push(doc);
-// // });
-// //
-// // all.addListener('end', function () {
-// // sys.puts("DONE! Loaded " + data.length + " documents.");
-// // });
-// //
-// // }
-// // );
-// //

0 comments on commit 9ff2cf4

Please sign in to comment.