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:43 UTC

[2/3] git commit: Attempt to force Netty to deal with UDP packet above 1k... Not really successful

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() {