# HG changeset patch
# User suruga
# Date 1492605404 -32400
# Node ID edc70340506d995cbfe7cf26a52104c48f5b7e3c
# Parent 5043bf6954192a08150a336a46024bd52228cb83
networkbenchmark jar log4j conflict
diff -r 5043bf695419 -r edc70340506d .idea/modules/bbs_main.iml
--- a/.idea/modules/bbs_main.iml Mon Apr 17 20:48:17 2017 +0900
+++ b/.idea/modules/bbs_main.iml Wed Apr 19 21:36:44 2017 +0900
@@ -39,13 +39,11 @@
-
-
-
+
@@ -68,9 +66,7 @@
-
-
diff -r 5043bf695419 -r edc70340506d .idea/modules/bbs_test.iml
--- a/.idea/modules/bbs_test.iml Mon Apr 17 20:48:17 2017 +0900
+++ b/.idea/modules/bbs_test.iml Wed Apr 19 21:36:44 2017 +0900
@@ -40,13 +40,11 @@
-
-
-
+
@@ -69,9 +67,7 @@
-
-
diff -r 5043bf695419 -r edc70340506d build.gradle
--- a/build.gradle Mon Apr 17 20:48:17 2017 +0900
+++ b/build.gradle Wed Apr 19 21:36:44 2017 +0900
@@ -14,8 +14,8 @@
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
compile "commons-collections:commons-collections:3.2.1"
- compile "org.apache.maven.surefire:surefire-junit4:2.13"
- compile "com.google.guava:guava:12.0"
+ //compile "org.apache.maven.surefire:surefire-junit4:2.13"
+ //compile "com.google.guava:guava:12.0"
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.3.13.v20161014'
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.3.13.v20161014'
compile group: 'org.eclipse.jetty', name: 'jetty-webapp', version: '9.3.13.v20161014'
@@ -25,17 +25,32 @@
compile group: 'cr.ie.u_ryukyu.ac.jp', name: 'jungle-core', version: '1.0', ext: 'jar'
compile group: 'cr.ie.u_ryukyu.ac.jp', name: 'Alice', version: '1.1', ext: 'jar'
jar {
- manifest {
- attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
- }
- from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
+ manifest {
+ attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
+ }
+ //from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
+ uploadArchives {
+ repositories {
+ flatDir {
+ dirs '.'
+ }
+ }
+ }
+}
- uploadArchives {
- repositories {
- flatDir {
- dirs '.'
- }
- }
- }
-}
+ task NetworkBenchmark(type: Jar) {
+ exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
+ baseName = "networkBenchmark"
+ manifest {
+ attributes(
+ "Main-Class": 'jp.ac.u_ryukyu.ie.cr.jungle.networkBenchmark.NetworkBenchmark',
+ "Implementation-Title": 'NetworkBenchmark',
+ "Implementation-Description": 'Quickstart',
+ "Implementation-Version": version,
+ "Assembly-Date": new java.util.Date().toString()
+ )
+ }
+ from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
+ with jar
+ }
\ No newline at end of file
diff -r 5043bf695419 -r edc70340506d src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java Mon Apr 17 20:48:17 2017 +0900
+++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java Wed Apr 19 21:36:44 2017 +0900
@@ -3,7 +3,18 @@
import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;
+import jp.ac.u_ryukyu.ie.cr.jungle.Jungle;
+import jp.ac.u_ryukyu.ie.cr.jungle.core.Children;
+import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath;
+import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor;
+import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser;
+import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree;
+import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
+import jp.ac.u_ryukyu.ie.cr.jungleNetwork.operations.NetworkNodePath;
+import jp.ac.u_ryukyu.ie.cr.jungleNetwork.persistent.PersistentJungle;
+import org.junit.Assert;
+import javax.swing.tree.TreeNode;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -18,6 +29,9 @@
private String[] args;
boolean persistentFlag = false;
+ private long time; //measure time
+ private boolean setTime = false;
+
public StartNetworkBenchmarkCodeSegment() {
args = null;
host.setKey("host");
@@ -31,6 +45,14 @@
String name = host.asString();
Matcher matcher = pattern.matcher(name);
matcher.find();
+
+ System.out.print(" node name: " + name);
+
+
+
+
+
+
//
// 1. wait for network node configration
// 2. start root node time measurement
@@ -38,5 +60,42 @@
// 4. measure leaf node respons time
// 5. end root node time measurement
//
+
}
+
+
+
+ //measure time method
+ public long getTime() {
+ return this.time;
+ }
+
+ public boolean getSetTime() {
+ return this.setTime;
+ }
+
+ public void setTimes ( long time, boolean setTime){
+ this.time = time;
+ this.setTime = setTime;
+ }
+
+ //start write on leaf node
+ public void CreateLeafNode() {
+// Jungle jungle = new PersistentJungle(journal1, "uuid", new DefaultTraverser());
+//
+// jungle.createNewTree("aho"); // created a new tree called "hoge"
+// JungleTree tree1 = jungle.getTreeByName("aho"); // Substitution that get a tree called "hoge" in Jungle for tree1
+// JungleTreeEditor editor = tree1.getJungleTreeEditor(); // add Editor for tree1
+// NetworkNodePath path = new NetworkNodePath(); //
+// TreeNode node1 = tree1.getRootNode();//get root node
+// Children child1 = node1.getChildren(); //for redblacktree いらない説
+// Either either = editor.addNewChildAt(path, pos); // add new Child
+// NodePath childPath = path.add(pos); // add position for child
+// Assert.assertFalse(either.isA()); // if either isA , end this method.
+// editor = either.b(); //
+// either = editor.putAttribute(childPath, key, value);//
+
+ }
+
+
}
\ No newline at end of file