You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2013/06/06 09:58:42 UTC
[1/3] git commit: o Added some logs in tests o Computed the number of
messages really sent
Updated Branches:
refs/heads/trunk 31767ad4c -> f5f64750c
o Added some logs in tests
o Computed the number of messages really sent
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/b2e3cf07
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/b2e3cf07
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/b2e3cf07
Branch: refs/heads/trunk
Commit: b2e3cf0723d4f736e35e77cd9f27c73c3b25203e
Parents: 72ea587
Author: Emmanuel Lécharny <el...@apache.org>
Authored: Thu Jun 6 09:53:01 2013 +0200
Committer: Emmanuel Lécharny <el...@apache.org>
Committed: Thu Jun 6 09:53:01 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/mina/core/CounterFilter.java | 31 +++++++++++++++
...3ClientVsMina3ServerTcpBenchmarkBinaryTest.java | 16 ++++++--
.../mina/core/nio/tcp/Mina3TcpBenchmarkServer.java | 2 +
.../core/nio/tcp/Netty3TcpBenchmarkServer.java | 6 +++
4 files changed, 51 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/b2e3cf07/benchmarks/src/test/java/org/apache/mina/core/CounterFilter.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/CounterFilter.java b/benchmarks/src/test/java/org/apache/mina/core/CounterFilter.java
new file mode 100644
index 0000000..f501141
--- /dev/null
+++ b/benchmarks/src/test/java/org/apache/mina/core/CounterFilter.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mina.core;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * A counter used for the benchmarks
+ *
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class CounterFilter {
+ public static AtomicLong messageSent = new AtomicLong(0);
+}
http://git-wip-us.apache.org/repos/asf/mina/blob/b2e3cf07/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest.java b/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest.java
index d258ec8..9135af6 100755
--- a/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest.java
@@ -56,10 +56,18 @@ public class Mina3ClientVsMina3ServerTcpBenchmarkBinaryTest extends BenchmarkBin
@Parameters(name = "{0} messages of size {1}")
public static Collection<Object[]> getParameters() {
- Object[][] parameters = new Object[][] { { 1000000, 10, 2 * 60 }, { 1000000, 1 * 1024, 2 * 60 },
- { 1000000, 10 * 1024, 2 * 60 }, { 1000000, 20 * 1024, 2 * 60 }, { 500000, 50 * 1024, 2 * 60 },
- { 200000, 100 * 1024, 2 * 60 }, { 100000, 200 * 1024, 2 * 60 }, { 50000, 500 * 1024, 2 * 60 },
- { 20000, 1024 * 1024, 2 * 60 }, { 2000, 10 * 1024 * 1024, 2 * 60 }, { 500, 64 * 1024 * 1024, 2 * 60 } };
+ Object[][] parameters = new Object[][] {
+ { 1000000, 10, 2 * 60 },
+ { 1000000, 1 * 1024, 2 * 60 },
+ { 1000000, 10 * 1024, 2 * 60 },
+ { 1000000, 20 * 1024, 2 * 60 },
+ { 500000, 50 * 1024, 2 * 60 },
+ { 200000, 100 * 1024, 2 * 60 },
+ { 100000, 200 * 1024, 2 * 60 },
+ { 50000, 500 * 1024, 2 * 60 },
+ { 20000, 1024 * 1024, 2 * 60 },
+ { 2000, 10 * 1024 * 1024, 2 * 60 },
+ { 500, 64 * 1024 * 1024, 2 * 60 } };
return Arrays.asList(parameters);
}
}
http://git-wip-us.apache.org/repos/asf/mina/blob/b2e3cf07/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
index 7ace829..c45ffb3 100755
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
@@ -28,6 +28,7 @@ import org.apache.mina.api.IoHandler;
import org.apache.mina.api.IoService;
import org.apache.mina.api.IoSession;
import org.apache.mina.core.BenchmarkServer;
+import org.apache.mina.core.CounterFilter;
import org.apache.mina.session.AttributeKey;
import org.apache.mina.transport.nio.NioTcpServer;
@@ -133,6 +134,7 @@ public class Mina3TcpBenchmarkServer implements BenchmarkServer {
@Override
public void messageSent(IoSession session, Object message) {
+ CounterFilter.messageSent.getAndIncrement();
}
@Override
http://git-wip-us.apache.org/repos/asf/mina/blob/b2e3cf07/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Netty3TcpBenchmarkServer.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Netty3TcpBenchmarkServer.java b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Netty3TcpBenchmarkServer.java
index 0f6631e..653bb76 100644
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Netty3TcpBenchmarkServer.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Netty3TcpBenchmarkServer.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.mina.core.BenchmarkServer;
+import org.apache.mina.core.CounterFilter;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -38,6 +39,7 @@ import org.jboss.netty.channel.ChildChannelStateEvent;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
+import org.jboss.netty.channel.WriteCompletionEvent;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
@@ -113,6 +115,10 @@ public class Netty3TcpBenchmarkServer implements BenchmarkServer {
allChannels.add(ctx.getChannel());
}
+ public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e) throws Exception {
+ CounterFilter.messageSent.getAndIncrement();
+ }
+
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
if (e.getMessage() instanceof ChannelBuffer) {
[2/3] git commit: Attempt to force Netty to deal with UDP packet
above 1k... Not really successful
Posted by el...@apache.org.
Attempt to force Netty to deal with UDP packet above 1k... Not really
successful
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/f310badc
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/f310badc
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/f310badc
Branch: refs/heads/trunk
Commit: f310badca11be90e16906307a37699dabd44c5ee
Parents: b2e3cf0
Author: Emmanuel Lécharny <el...@apache.org>
Authored: Thu Jun 6 09:53:55 2013 +0200
Committer: Emmanuel Lécharny <el...@apache.org>
Committed: Thu Jun 6 09:53:55 2013 +0200
----------------------------------------------------------------------
.../core/nio/udp/Netty3UdpBenchmarkClient.java | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/f310badc/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
index 0cbc0d6..ebc92e8 100644
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
@@ -33,6 +33,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.Channels;
+import org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory;
@@ -58,6 +59,7 @@ public class Netty3UdpBenchmarkClient implements BenchmarkClient {
factory = new NioDatagramChannelFactory();
ConnectionlessBootstrap bootstrap = new ConnectionlessBootstrap(factory);
bootstrap.setOption("sendBufferSize", 65536);
+ bootstrap.setOption("receiveBufferSizePredictorFactory", new FixedReceiveBufferSizePredictorFactory(9000));
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() throws Exception {
return Channels.pipeline(new SimpleChannelUpstreamHandler() {
[3/3] git commit: Merge branch 'trunk' of
http://git-wip-us.apache.org/repos/asf/mina into trunk
Posted by el...@apache.org.
Merge branch 'trunk' of http://git-wip-us.apache.org/repos/asf/mina into trunk
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/f5f64750
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/f5f64750
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/f5f64750
Branch: refs/heads/trunk
Commit: f5f64750cea1c3a380a9e4a8b6f776c47d200d0a
Parents: f310bad 31767ad
Author: Emmanuel Lécharny <el...@apache.org>
Authored: Thu Jun 6 09:57:25 2013 +0200
Committer: Emmanuel Lécharny <el...@apache.org>
Committed: Thu Jun 6 09:57:25 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/mina/coap/CoapOptionType.java | 2 +-
.../org/apache/mina/coap/codec/CoapDecoder.java | 3 +
.../apache/mina/coap/codec/CoapDecoderTest.java | 5 +
.../apache/mina/coap/codec/CoapEncoderTest.java | 6 +
.../org/apache/mina/coap/codec/TestMessages.java | 11 +-
.../mina/filter/codec/ProtocolCodecFilter.java | 1 +
.../org/apache/mina/transport/nio/SslHelper.java | 300 +++++----------
.../org/apache/mina/transport/nio/SslTest.java | 5 +-
.../org/apache/mina/transport/nio/keystore.cert | Bin 0 -> 937 bytes
.../org/apache/mina/transport/nio/keystore.sslTest | Bin 0 -> 1368 bytes
.../apache/mina/transport/nio/truststore.sslTest | Bin 0 -> 654 bytes
.../org/apache/mina/transport/tcp/keystore.cert | Bin 937 -> 0 bytes
.../org/apache/mina/transport/tcp/keystore.sslTest | Bin 1368 -> 0 bytes
.../apache/mina/transport/tcp/truststore.sslTest | Bin 654 -> 0 bytes
14 files changed, 127 insertions(+), 206 deletions(-)
----------------------------------------------------------------------