Mercurial > hg > Members > tatsuki > jungle-bench
comparison src/main/java/example/SimplejungleMalti.java @ 8:442463aa27e5
miss Spell revision
author | one |
---|---|
date | Tue, 01 Apr 2014 18:28:34 +0900 |
parents | 24fca21a576e |
children |
comparison
equal
deleted
inserted
replaced
7:4e1f8f434648 | 8:442463aa27e5 |
---|---|
23 .getBytes()); | 23 .getBytes()); |
24 | 24 |
25 public static void main(String[] args) { | 25 public static void main(String[] args) { |
26 System.out.println(args[0]); | 26 System.out.println(args[0]); |
27 System.out.println(args[1]); | 27 System.out.println(args[1]); |
28 int roopCount = Integer.parseInt(args[0]); | 28 int loopCount = Integer.parseInt(args[0]); |
29 int threadCount = Integer.parseInt(args[1]); | 29 int threadCount = Integer.parseInt(args[1]); |
30 WriteThread[] wt = new WriteThread[threadCount]; | 30 WriteThread[] wt = new WriteThread[threadCount]; |
31 Jungle j = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor( | 31 Jungle j = new DefaultJungle(null, "hogehoge", new DefaultTreeEditor( |
32 new DefaultTraverser())); | 32 new DefaultTraverser())); |
33 j.createNewTree("tree");// 木を作った | 33 j.createNewTree("tree");// 木を作った |
64 // そしてここで子ノードに値を入れる | 64 // そしてここで子ノードに値を入れる |
65 | 65 |
66 long t1 = System.currentTimeMillis();// 時間の測定開始 | 66 long t1 = System.currentTimeMillis();// 時間の測定開始 |
67 for (int count = 0; count < threadCount; count++) { | 67 for (int count = 0; count < threadCount; count++) { |
68 wt[count] = new WriteThread(j, childPath, | 68 wt[count] = new WriteThread(j, childPath, |
69 (roopCount / threadCount), count); | 69 (loopCount / threadCount), count); |
70 } | 70 } |
71 for (int count = 0; count < threadCount; count++) { | 71 for (int count = 0; count < threadCount; count++) { |
72 wt[count].start(); | 72 wt[count].start(); |
73 } | 73 } |
74 | 74 |