Mercurial > hg > Members > tatsuki > jungle-bench
view src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle_core/ReadTreeThread.java @ 20:195c1a644550
benchmark add
author | tatsuki |
---|---|
date | Tue, 17 Mar 2015 15:37:19 +0900 |
parents | |
children | c8d8864714d4 |
line wrap: on
line source
package jp.ac.u_ryukyu.ie.cr.tatsuki.jungle_core; import jp.ac.u_ryukyu.cr.ie.tatsuki.xmlTestBbs.JuGrix; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; import java.util.Random; /** * Created by e115731 on 15/03/14. */ public class ReadTreeThread extends Thread { JungleTree tree; private long findCount; boolean loop = true; public ReadTreeThread(JungleTree tree) { this.tree = tree; this.findCount = 0; } public long getFindCount() { System.out.println("thread count = " + findCount); return findCount; } public void set(boolean loop) { this.loop = loop; } @Override public void run() { while (loop) { TreeNode root = tree.getRootNode(); if (root.getAttributes().getString("test").equals("test")) findCount++; else System.out.println("faild"); // String attribute = root.getAttributes().getString("test"); // if (attribute.equals("test")) // findCount++; // else // System.out.println("faild"); } } }