Mercurial > hg > Members > tatsuki > jungle-bench
changeset 8:442463aa27e5
miss Spell revision
author | one |
---|---|
date | Tue, 01 Apr 2014 18:28:34 +0900 |
parents | 4e1f8f434648 |
children | ae1faea6f7c9 |
files | src/main/java/example/ReadThread.java src/main/java/example/SimpleJungleRead.java src/main/java/example/SimplejungleMalti.java src/main/java/example/WriteThread.java |
diffstat | 4 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/example/ReadThread.java Tue Apr 01 04:35:08 2014 +0900 +++ b/src/main/java/example/ReadThread.java Tue Apr 01 18:28:34 2014 +0900 @@ -17,13 +17,13 @@ public class ReadThread extends Thread { public static final String key = "name"; - int roopCount; + int loopCount; Jungle j; List<DefaultNodePath> paths; - ReadThread(Jungle j, int roopCount, List<DefaultNodePath> paths) { - this.roopCount = roopCount; - System.out.println(roopCount); + ReadThread(Jungle j, int loopCount, List<DefaultNodePath> paths) { + this.loopCount = loopCount; + System.out.println(loopCount); this.paths = paths; this.j = j; } @@ -33,7 +33,7 @@ DefaultTraverser traverser = new DefaultTraverser(); TraversableNodeWrapper<Node> traversable = new TraversableNodeWrapper<Node>( tree.getRootNode()); - for (int count = 0; count < roopCount; count++) { + for (int count = 0; count < loopCount; count++) { for (DefaultNodePath path : paths) { DefaultEvaluator evaluator = new DefaultEvaluator(path); Either<Error, Traversal<TraversableNodeWrapper<Node>>> ret = traverser
--- a/src/main/java/example/SimpleJungleRead.java Tue Apr 01 04:35:08 2014 +0900 +++ b/src/main/java/example/SimpleJungleRead.java Tue Apr 01 18:28:34 2014 +0900 @@ -24,7 +24,7 @@ public static void main(String[] args) { System.out.println("タスク数" + args[0]); System.out.println("CPU数" + args[1]); - int roopCount = Integer.parseInt(args[0]); + int loopCount = Integer.parseInt(args[0]); int threadCount = Integer.parseInt(args[1]); ReadThread[] wt = new ReadThread[threadCount]; @@ -44,7 +44,7 @@ // ここで処理を行う for (int count = 0; count < threadCount; count++) { - wt[count] = new ReadThread(j, (roopCount / threadCount), paths); + wt[count] = new ReadThread(j, (loopCount / threadCount), paths); } long t1 = System.currentTimeMillis();// 時間の測定開始 for (int count = 0; count < threadCount; count++) {
--- a/src/main/java/example/SimplejungleMalti.java Tue Apr 01 04:35:08 2014 +0900 +++ b/src/main/java/example/SimplejungleMalti.java Tue Apr 01 18:28:34 2014 +0900 @@ -25,7 +25,7 @@ public static void main(String[] args) { System.out.println(args[0]); System.out.println(args[1]); - int roopCount = Integer.parseInt(args[0]); + int loopCount = Integer.parseInt(args[0]); int threadCount = Integer.parseInt(args[1]); WriteThread[] wt = new WriteThread[threadCount]; Jungle j = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor( @@ -66,7 +66,7 @@ long t1 = System.currentTimeMillis();// 時間の測定開始 for (int count = 0; count < threadCount; count++) { wt[count] = new WriteThread(j, childPath, - (roopCount / threadCount), count); + (loopCount / threadCount), count); } for (int count = 0; count < threadCount; count++) { wt[count].start();
--- a/src/main/java/example/WriteThread.java Tue Apr 01 04:35:08 2014 +0900 +++ b/src/main/java/example/WriteThread.java Tue Apr 01 18:28:34 2014 +0900 @@ -16,14 +16,14 @@ public ByteBuffer value = ByteBuffer.wrap(valueString.getBytes()); Jungle j; NodePath childPath; - int roopCount; + int loopCount; int num; - WriteThread(Jungle j, NodePath childPath, int roopCount, int num) { + WriteThread(Jungle j, NodePath childPath, int loopCount, int num) { this.num = num; this.valueString = this.valueString + Integer.toString(num); this.value = ByteBuffer.wrap(valueString.getBytes()); - this.roopCount = roopCount; + this.loopCount = loopCount; this.j = j; this.childPath = childPath; } @@ -31,10 +31,10 @@ public void run() { JungleTree tree = j.getTreeByName("tree");// 名前を取得 Either<Error, JungleTreeEditor> either; - System.out.println("roopCount = " + roopCount); + System.out.println("loopCount = " + loopCount); long t1 = System.currentTimeMillis();// 時間の測定開始 - for (int count = 0; count < roopCount; count++) { + for (int count = 0; count < loopCount; count++) { do { JungleTreeEditor editor = tree.getTreeEditor();// Treeのeditorを作成 either = editor.putAttribute(childPath, key, value);