Mercurial > hg > Members > tatsuki > jungle-bench
comparison src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/xml/ReadJungleThread.java @ 20:195c1a644550
benchmark add
author | tatsuki |
---|---|
date | Tue, 17 Mar 2015 15:37:19 +0900 |
parents | 17cc11b04157 |
children | c8d8864714d4 |
comparison
equal
deleted
inserted
replaced
19:17cc11b04157 | 20:195c1a644550 |
---|---|
1 package jp.ac.u_ryukyu.ie.cr.tatsuki.xml; | 1 package jp.ac.u_ryukyu.ie.cr.tatsuki.xml; |
2 | 2 |
3 import java.util.Iterator; | |
4 import java.util.Random; | 3 import java.util.Random; |
4 import jp.ac.u_ryukyu.cr.ie.tatsuki.xmlTestBbs.JuGrix; | |
5 | 5 |
6 import jp.ac.u_ryukyu.cr.ie.tatsuki.xmlTestBbs.JuGrix; | |
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree; | |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; | |
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.InterfaceTraverser; | |
10 | 6 |
11 public class ReadJungleThread extends Thread { | 7 public class ReadJungleThread extends Thread { |
12 | 8 |
13 JuGrix jugrix; | 9 JuGrix jugrix; |
14 int findCount; | 10 int findCount; |
11 int successCount; | |
12 int faildCount; | |
15 boolean loop = true; | 13 boolean loop = true; |
16 | 14 |
17 public ReadJungleThread(JuGrix jugrix) { | 15 public ReadJungleThread(JuGrix jugrix) { |
18 this.jugrix = jugrix; | 16 this.jugrix = jugrix; |
19 this.findCount = 0; | 17 this.findCount = 0; |
18 this.successCount = 0; | |
19 this.faildCount = 0; | |
20 } | 20 } |
21 | 21 |
22 public int getFindCount() { | 22 public int getFindCount() { |
23 System.out.println("thread count = " + findCount); | |
23 return findCount; | 24 return findCount; |
24 } | 25 } |
25 | 26 |
26 public void set(boolean loop) { | 27 public void set(boolean loop) { |
27 this.loop = loop; | 28 this.loop = loop; |
34 findCount++; | 35 findCount++; |
35 Random rnd = new Random(); | 36 Random rnd = new Random(); |
36 | 37 |
37 String value = String.valueOf(rnd.nextInt(400)); | 38 String value = String.valueOf(rnd.nextInt(400)); |
38 boolean account = jugrix.isActive("p:" + value,"v:1"); | 39 boolean account = jugrix.isActive("p:" + value,"v:1"); |
39 // System.out.println(account); | 40 if (account) |
41 successCount++; | |
42 else | |
43 faildCount++; | |
40 } | 44 } |
41 } | 45 } |
42 } | 46 } |