Mercurial > hg > Members > tatsuki > bench > jungle-core
changeset 190:a01507a9f826 default tip
change TreeMapBenchMark
author | tatsuki |
---|---|
date | Tue, 21 Apr 2015 17:28:20 +0900 |
parents | 31d9158356de |
children | |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultChangeSet.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/TreeMapBenchMark.java |
diffstat | 2 files changed, 4 insertions(+), 91 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultChangeSet.java Sat Apr 18 20:13:12 2015 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction; - -import fj.data.TreeMap; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.persistent.ChangeList; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.ChangeSet; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation; -import jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.store.index.ParentIndex; - -public class DefaultChangeSet implements ChangeSet -{ - private final TreeNode root; - private final ChangeSet previous; - private final ChangeList changeList; - private final String uuid; - private final String treeName; - private final long revision; - private final TreeMap<String, TreeMap<String, TreeMap<TreeNode, TreeNode>>> indexList; - private final TreeMap<TreeNode, TreeNode> parentIndex; - - public DefaultChangeSet(TreeNode _node,ChangeSet _prev,ChangeList _log,String _uuid, String _treeName, long _revision, TreeMap<String, TreeMap<String, TreeMap<TreeNode, TreeNode>>> indexList, - TreeMap<TreeNode, TreeNode> parentIndex) - { - this.root = _node; - this.previous = _prev; - this.changeList = _log; - this.uuid = _uuid; - this.treeName = _treeName; - this.revision = _revision; - this.indexList = indexList; - this.parentIndex = parentIndex; - } - - - @Override - public TreeNode getRoot() - { - return root; - } - - @Override - public ChangeSet prev() - { - return previous; - } - - @Override - public ChangeList getChangeList() - { - return changeList; - } - - @Override - public String uuid() - { - return uuid; - } - - @Override - public String getTreeName() - { - return treeName; - } - - @Override - public long revision() - { - return revision; - } - - @Override - public Iterable<TreeOperation> getOperations() - { - return changeList; - } - - @Override - public TreeMap<String, TreeMap<String, TreeMap<TreeNode, TreeNode>>> getIndex() { - return indexList; - } - - - @Override - public ParentIndex getParentIndex() { - return new ParentIndex(parentIndex); - } - -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/TreeMapBenchMark.java Sat Apr 18 20:13:12 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/test/TreeMapBenchMark.java Tue Apr 21 17:28:20 2015 +0900 @@ -11,8 +11,8 @@ * Created by e115731 on 15/03/17. */ public class TreeMapBenchMark { - public static void main(String[] args) throws InterruptedException, IOException, ParserConfigurationException, SAXException { - Thread.sleep(1000); + public static void main(String[] args) throws InterruptedException, IOException { + Thread.sleep(5000); if (args.length == 0) { System.out.println("args get or getLoop or list"); @@ -80,8 +80,9 @@ pw.println(THREAD_COUNT + " " + readCount); System.out.println(THREAD_COUNT + "readCount = " + readCount); + Thread.sleep(1000); } - Thread.sleep(1000); + pw.close(); }