Mercurial > hg > Members > tatsuki > bbs
changeset 11:edc70340506d draft default tip
networkbenchmark jar log4j conflict
author | suruga |
---|---|
date | Wed, 19 Apr 2017 21:36:44 +0900 |
parents | 5043bf695419 |
children | |
files | .idea/modules/bbs_main.iml .idea/modules/bbs_test.iml build.gradle src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java |
diffstat | 4 files changed, 90 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <orderEntry type="library" name="Gradle: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4" level="project" /> <orderEntry type="library" name="Gradle: org.antlr:antlr:3.5.2" level="project" /> <orderEntry type="library" name="Gradle: org.antlr:antlr-runtime:3.5.2" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:log4j-over-slf4j:1.7.7" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:jcl-over-slf4j:1.7.7" level="project" /> <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-core-asl:1.9.2" level="project" /> <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-mapper-asl:1.9.2" level="project" /> <orderEntry type="library" name="Gradle: com.googlecode.json-simple:json-simple:1.1" level="project" /> <orderEntry type="library" name="Gradle: com.boundary:high-scale-lib:1.0.6" level="project" /> - <orderEntry type="library" name="Gradle: org.mindrot:jbcrypt:0.3m" level="project" /> + <orderEntry type="library" name="log4" level="project" /> <orderEntry type="library" name="Gradle: io.dropwizard.metrics:metrics-core:3.1.0" level="project" /> <orderEntry type="library" name="Gradle: io.dropwizard.metrics:metrics-jvm:3.1.0" level="project" /> <orderEntry type="library" name="Gradle: com.addthis.metrics:reporter-config3:3.0.0" level="project" /> @@ -68,9 +66,7 @@ <orderEntry type="library" name="Gradle: com.lmax:disruptor:3.0.1" level="project" /> <orderEntry type="library" name="Gradle: it.unimi.dsi:fastutil:6.5.7" level="project" /> <orderEntry type="library" name="Gradle: javax.validation:validation-api:1.0.0.GA" level="project" /> - <orderEntry type="library" name="Gradle: org.jboss.logging:jboss-logging:3.1.0.CR2" level="project" /> <orderEntry type="library" name="Gradle: com.google.guava:guava:18.0" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.12" level="project" /> <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-thrift:3.9" level="project" /> <orderEntry type="library" name="Gradle: com.carrotsearch:hppc:0.5.4" level="project" /> <orderEntry type="library" name="Gradle: de.jflex:jflex:1.6.0" level="project" />
--- 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 @@ <orderEntry type="library" name="Gradle: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4" level="project" /> <orderEntry type="library" name="Gradle: org.antlr:antlr:3.5.2" level="project" /> <orderEntry type="library" name="Gradle: org.antlr:antlr-runtime:3.5.2" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:log4j-over-slf4j:1.7.7" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:jcl-over-slf4j:1.7.7" level="project" /> <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-core-asl:1.9.2" level="project" /> <orderEntry type="library" name="Gradle: org.codehaus.jackson:jackson-mapper-asl:1.9.2" level="project" /> <orderEntry type="library" name="Gradle: com.googlecode.json-simple:json-simple:1.1" level="project" /> <orderEntry type="library" name="Gradle: com.boundary:high-scale-lib:1.0.6" level="project" /> - <orderEntry type="library" name="Gradle: org.mindrot:jbcrypt:0.3m" level="project" /> + <orderEntry type="library" name="log4" level="project" /> <orderEntry type="library" name="Gradle: io.dropwizard.metrics:metrics-core:3.1.0" level="project" /> <orderEntry type="library" name="Gradle: io.dropwizard.metrics:metrics-jvm:3.1.0" level="project" /> <orderEntry type="library" name="Gradle: com.addthis.metrics:reporter-config3:3.0.0" level="project" /> @@ -69,9 +67,7 @@ <orderEntry type="library" name="Gradle: com.lmax:disruptor:3.0.1" level="project" /> <orderEntry type="library" name="Gradle: it.unimi.dsi:fastutil:6.5.7" level="project" /> <orderEntry type="library" name="Gradle: javax.validation:validation-api:1.0.0.GA" level="project" /> - <orderEntry type="library" name="Gradle: org.jboss.logging:jboss-logging:3.1.0.CR2" level="project" /> <orderEntry type="library" name="Gradle: com.google.guava:guava:18.0" level="project" /> - <orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.12" level="project" /> <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-thrift:3.9" level="project" /> <orderEntry type="library" name="Gradle: com.carrotsearch:hppc:0.5.4" level="project" /> <orderEntry type="library" name="Gradle: de.jflex:jflex:1.6.0" level="project" />
--- 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
--- 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<Error, JungleTreeEditor> 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