annotate benchmark/find.js @ 309:f8e75ef7ac5d

RedBlackJungleTreeEditor delete Attribute bug fix
author tatsuki
date Thu, 26 Jan 2017 16:19:51 +0900
parents 5aad7dbb390e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
199
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
1 function findDataLoop () {
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
2 var date_obj = new Date();
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
3 var milliseconds = date_obj.getTime();
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
4 for (var i = 1; i<= 50000; i++) {
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
5 var personData = db.person1.find({PersonId:"p:9"}).next();
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
6 var roleId = personData.roleId
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
7 }
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
8 date_obj = new Date();
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
9 print(date_obj.getTime() - milliseconds)
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
10 }
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
11
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
12 function findData () {
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
13 var personVer = db.config.find({configVer:"v:1"}).next().PersonVer;
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
14 var personCollection = db.getCollection(personVer);
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
15 db.person1.find({PersonId:"p:9"}).next();
5aad7dbb390e add benchMark
tatsuki
parents:
diff changeset
16 }