Mercurial > hg > Members > tatsuki > bbs
changeset 10:5043bf695419 draft
create jungle.NetworkBenchmarkCodesegment
author | suruga |
---|---|
date | Mon, 17 Apr 2017 20:48:17 +0900 |
parents | 2890ae6b1aef |
children | edc70340506d |
files | .idea/kotlinc.xml .idea/modules/bbs_main.iml .idea/modules/bbs_test.iml src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/NetworkBenchmark.java src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java |
diffstat | 5 files changed, 249 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.idea/kotlinc.xml Mon Apr 17 20:48:17 2017 +0900 @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="KotlinCommonCompilerArguments"> + <option name="languageVersion" value="1.1" /> + <option name="apiVersion" value="1.1" /> + </component> +</project> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.idea/modules/bbs_main.iml Mon Apr 17 20:48:17 2017 +0900 @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id="bbs:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="1.0" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> + <output url="file://$MODULE_DIR$/../../build/classes/main" /> + <exclude-output /> + <content url="file://$MODULE_DIR$/../../src/main"> + <sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-junit4:2.13" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-server:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-servlet:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-webapp:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: junit:junit:4.11" level="project" /> + <orderEntry type="library" name="Gradle: org.hectorclient:hector-core:1.1-2" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-all:3.9" level="project" /> + <orderEntry type="library" name="Gradle: cr.ie.u_ryukyu.ac.jp:jungle-core:1.0" level="project" /> + <orderEntry type="library" name="Gradle: cr.ie.u_ryukyu.ac.jp:Alice:1.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-api:2.13" level="project" /> + <orderEntry type="library" name="Gradle: javax.servlet:javax.servlet-api:3.1.0" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-http:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-io:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-security:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-xml:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" /> + <orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-pool:commons-pool:1.5.3" level="project" /> + <orderEntry type="library" name="Gradle: com.github.stephenc.eaio-uuid:uuid:3.2.0" level="project" /> + <orderEntry type="library" name="Gradle: com.ecyrd.speed4j:speed4j:0.9" level="project" /> + <orderEntry type="library" name="Gradle: org.xerial.snappy:snappy-java:1.1.1.7" level="project" /> + <orderEntry type="library" name="Gradle: net.jpountz.lz4:lz4:1.3.0" level="project" /> + <orderEntry type="library" name="Gradle: com.ning:compress-lzf:0.8.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-cli:commons-cli:1.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.commons:commons-math3:3.2" level="project" /> + <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="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" /> + <orderEntry type="library" name="Gradle: com.thinkaurelius.thrift:thrift-server:0.3.7" level="project" /> + <orderEntry type="library" name="Gradle: com.clearspring.analytics:stream:2.5.2" level="project" /> + <orderEntry type="library" name="Gradle: ch.qos.logback:logback-core:1.1.3" level="project" /> + <orderEntry type="library" name="Gradle: ch.qos.logback:logback-classic:1.1.3" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.thrift:libthrift:0.9.2" level="project" /> + <orderEntry type="library" name="Gradle: com.github.jbellis:jamm:0.3.0" level="project" /> + <orderEntry type="library" name="Gradle: io.netty:netty-all:4.0.39.Final" level="project" /> + <orderEntry type="library" name="Gradle: joda-time:joda-time:2.4" level="project" /> + <orderEntry type="library" name="Gradle: org.fusesource:sigar:1.6.4" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jdt.core.compiler:ecj:4.4.2" level="project" /> + <orderEntry type="library" name="Gradle: org.caffinitas.ohc:ohc-core:0.4.3" level="project" /> + <orderEntry type="library" name="Gradle: com.github.ben-manes.caffeine:caffeine:2.2.6" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-util:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.antlr:ST4:4.0.8" level="project" /> + <orderEntry type="library" name="Gradle: com.addthis.metrics:reporter-config-base:3.0.0" level="project" /> + <orderEntry type="library" name="Gradle: org.hibernate:hibernate-validator:4.3.0.Final" level="project" /> + <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" /> + <orderEntry type="library" name="Gradle: net.mintern:primitive:1.0" level="project" /> + <orderEntry type="library" name="Gradle: com.github.rholder:snowball-stemmer:1.3.0.581.1" level="project" /> + <orderEntry type="library" name="Gradle: com.googlecode.concurrent-trees:concurrent-trees:2.4.0" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.ant:ant:1.7.0" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.ant:ant-launcher:1.7.0" level="project" /> + <orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.12" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.2.5" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.2.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.1.1" level="project" /> + <orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.1.0" level="project" /> + <orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.6" level="project" /> + </component> +</module> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.idea/modules/bbs_test.iml Mon Apr 17 20:48:17 2017 +0900 @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id="bbs:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="1.0" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> + <output-test url="file://$MODULE_DIR$/../../build/classes/test" /> + <exclude-output /> + <content url="file://$MODULE_DIR$/../../src/test"> + <sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="bbs_main" /> + <orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-junit4:2.13" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-server:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-servlet:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-webapp:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: junit:junit:4.11" level="project" /> + <orderEntry type="library" name="Gradle: org.hectorclient:hector-core:1.1-2" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.cassandra:cassandra-all:3.9" level="project" /> + <orderEntry type="library" name="Gradle: cr.ie.u_ryukyu.ac.jp:jungle-core:1.0" level="project" /> + <orderEntry type="library" name="Gradle: cr.ie.u_ryukyu.ac.jp:Alice:1.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.maven.surefire:surefire-api:2.13" level="project" /> + <orderEntry type="library" name="Gradle: javax.servlet:javax.servlet-api:3.1.0" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-http:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-io:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-security:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-xml:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" /> + <orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-pool:commons-pool:1.5.3" level="project" /> + <orderEntry type="library" name="Gradle: com.github.stephenc.eaio-uuid:uuid:3.2.0" level="project" /> + <orderEntry type="library" name="Gradle: com.ecyrd.speed4j:speed4j:0.9" level="project" /> + <orderEntry type="library" name="Gradle: org.xerial.snappy:snappy-java:1.1.1.7" level="project" /> + <orderEntry type="library" name="Gradle: net.jpountz.lz4:lz4:1.3.0" level="project" /> + <orderEntry type="library" name="Gradle: com.ning:compress-lzf:0.8.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-cli:commons-cli:1.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.1" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.commons:commons-math3:3.2" level="project" /> + <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="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" /> + <orderEntry type="library" name="Gradle: com.thinkaurelius.thrift:thrift-server:0.3.7" level="project" /> + <orderEntry type="library" name="Gradle: com.clearspring.analytics:stream:2.5.2" level="project" /> + <orderEntry type="library" name="Gradle: ch.qos.logback:logback-core:1.1.3" level="project" /> + <orderEntry type="library" name="Gradle: ch.qos.logback:logback-classic:1.1.3" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.thrift:libthrift:0.9.2" level="project" /> + <orderEntry type="library" name="Gradle: com.github.jbellis:jamm:0.3.0" level="project" /> + <orderEntry type="library" name="Gradle: io.netty:netty-all:4.0.39.Final" level="project" /> + <orderEntry type="library" name="Gradle: joda-time:joda-time:2.4" level="project" /> + <orderEntry type="library" name="Gradle: org.fusesource:sigar:1.6.4" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jdt.core.compiler:ecj:4.4.2" level="project" /> + <orderEntry type="library" name="Gradle: org.caffinitas.ohc:ohc-core:0.4.3" level="project" /> + <orderEntry type="library" name="Gradle: com.github.ben-manes.caffeine:caffeine:2.2.6" level="project" /> + <orderEntry type="library" name="Gradle: org.eclipse.jetty:jetty-util:9.3.13.v20161014" level="project" /> + <orderEntry type="library" name="Gradle: org.antlr:ST4:4.0.8" level="project" /> + <orderEntry type="library" name="Gradle: com.addthis.metrics:reporter-config-base:3.0.0" level="project" /> + <orderEntry type="library" name="Gradle: org.hibernate:hibernate-validator:4.3.0.Final" level="project" /> + <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" /> + <orderEntry type="library" name="Gradle: net.mintern:primitive:1.0" level="project" /> + <orderEntry type="library" name="Gradle: com.github.rholder:snowball-stemmer:1.3.0.581.1" level="project" /> + <orderEntry type="library" name="Gradle: com.googlecode.concurrent-trees:concurrent-trees:2.4.0" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.ant:ant:1.7.0" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.ant:ant-launcher:1.7.0" level="project" /> + <orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.12" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpclient:4.2.5" level="project" /> + <orderEntry type="library" name="Gradle: org.apache.httpcomponents:httpcore:4.2.4" level="project" /> + <orderEntry type="library" name="Gradle: commons-logging:commons-logging:1.1.1" level="project" /> + <orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.1.0" level="project" /> + <orderEntry type="library" name="Gradle: commons-codec:commons-codec:1.6" level="project" /> + </component> + <component name="TestModuleProperties" production-module="bbs_main" /> +</module> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/NetworkBenchmark.java Mon Apr 17 20:48:17 2017 +0900 @@ -0,0 +1,20 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.networkBenchmark; + +import alice.topology.node.TopologyNode; +import jp.ac.u_ryukyu.ie.cr.jungleNetwork.remote.RemoteConfig; + +/** + * Created by one on 2017/04/17. + */ +public class NetworkBenchmark { + public static void main(String[] args) throws Exception { + RemoteConfig conf = new RemoteConfig(args); + System.out.println("test"); + if (conf.getManagerHostName() == null) { + StartNetworkBenchmarkCodeSegment cs1 = new StartNetworkBenchmarkCodeSegment(args, conf.bbsPort); + cs1.ods.put("host", "node0"); + } else { + new TopologyNode(conf, new StartNetworkBenchmarkCodeSegment(args, conf.bbsPort)); + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/networkBenchmark/StartNetworkBenchmarkCodeSegment.java Mon Apr 17 20:48:17 2017 +0900 @@ -0,0 +1,42 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.networkBenchmark; + +import alice.codesegment.CodeSegment; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Created by one on 2017/04/17. + */ +public class StartNetworkBenchmarkCodeSegment extends CodeSegment { + + int bbsPort = 8080; + Receiver host = ids.create(CommandType.PEEK); + private Pattern pattern = Pattern.compile("^(node|cli)([0-9]+)$"); + private String[] args; + boolean persistentFlag = false; + + public StartNetworkBenchmarkCodeSegment() { + args = null; + host.setKey("host"); + } + + public StartNetworkBenchmarkCodeSegment(String[] args, int bbsPort) { + } + + @Override + public void run() { + String name = host.asString(); + Matcher matcher = pattern.matcher(name); + matcher.find(); + // + // 1. wait for network node configration + // 2. start root node time measurement + // 3. start write on leaf nodes + // 4. measure leaf node respons time + // 5. end root node time measurement + // + } +} \ No newline at end of file