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/01/04 01:40:46 UTC

svn commit: r1428685 - in /mina/mina/trunk/benchmarks: ./ .settings/ src/ src/test/ src/test/java/ src/test/java/org/ src/test/java/org/apache/ src/test/java/org/apache/mina/ src/test/java/org/apache/mina/core/ src/test/resources/

Author: elecharny
Date: Fri Jan  4 00:40:46 2013
New Revision: 1428685

URL: http://svn.apache.org/viewvc?rev=1428685&view=rev
Log:
Added the benchmark module

Added:
    mina/mina/trunk/benchmarks/
    mina/mina/trunk/benchmarks/.classpath
    mina/mina/trunk/benchmarks/.project
    mina/mina/trunk/benchmarks/.settings/
    mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.core.prefs
    mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.ui.prefs
    mina/mina/trunk/benchmarks/pom.xml   (with props)
    mina/mina/trunk/benchmarks/src/
    mina/mina/trunk/benchmarks/src/test/
    mina/mina/trunk/benchmarks/src/test/java/
    mina/mina/trunk/benchmarks/src/test/java/org/
    mina/mina/trunk/benchmarks/src/test/java/org/apache/
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java   (with props)
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyBenchmarkClient.java
    mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyClientVsMinaServerBenchmarkBinaryTest.java
    mina/mina/trunk/benchmarks/src/test/resources/
    mina/mina/trunk/benchmarks/src/test/resources/log4j.properties   (with props)

Added: mina/mina/trunk/benchmarks/.classpath
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/.classpath?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/.classpath (added)
+++ mina/mina/trunk/benchmarks/.classpath Fri Jan  4 00:40:46 2013
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="src" path="/mina-core"/>
+  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/elecharny/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/io/netty/netty/3.5.9.Final/netty-3.5.9.Final.jar" sourcepath="M2_REPO/io/netty/netty/3.5.9.Final/netty-3.5.9.Final-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/elecharny/.m2/repository/io/netty/netty/3.5.9.Final/netty-3.5.9.Final-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.10/junit-4.10.jar" sourcepath="M2_REPO/junit/junit/4.10/junit-4.10-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/elecharny/.m2/repository/junit/junit/4.10/junit-4.10-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
+</classpath>
\ No newline at end of file

Added: mina/mina/trunk/benchmarks/.project
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/.project?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/.project (added)
+++ mina/mina/trunk/benchmarks/.project Fri Jan  4 00:40:46 2013
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+  <name>mina-benchmarks</name>
+  <comment>Apache MINA is a network application framework which helps users 
+    develop high performance and highly scalable network applications easily. 
+    It provides an abstract event-driven asynchronous API over various 
+    transports such as TCP/IP and UDP/IP via Java NIO. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <projects>
+    <project>mina-core</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.core.prefs?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.core.prefs (added)
+++ mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.core.prefs Fri Jan  4 00:40:46 2013
@@ -0,0 +1,288 @@
+eclipse.preferences.version=1
+encoding/src/main/java=UTF-8
+encoding/src/main/resources=UTF-8
+encoding/src/test/java=UTF-8
+encoding/src/test/resources=UTF-8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

Added: mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.ui.prefs?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.ui.prefs (added)
+++ mina/mina/trunk/benchmarks/.settings/org.eclipse.jdt.ui.prefs Fri Jan  4 00:40:46 2013
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+formatter_profile=_Improved Java Conventions
+formatter_settings_version=12

Added: mina/mina/trunk/benchmarks/pom.xml
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/pom.xml?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/pom.xml (added)
+++ mina/mina/trunk/benchmarks/pom.xml Fri Jan  4 00:40:46 2013
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>3.0.0-M1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mina-benchmarks</artifactId>
+  <groupId>org.apache.mina</groupId>
+  <name>Apache MINA Benchmarks tests</name>
+  
+<properties>
+     <!-- defined in order to run against a different MINA version -->
+     <mina.version>${project.version}</mina.version>
+     <netty.version>3.5.9.Final</netty.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>${mina.version}</version>
+      <type>bundle</type>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty</artifactId>
+      <version>${netty.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+     <groupId>org.slf4j</groupId>
+     <artifactId>slf4j-api</artifactId>
+     <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: mina/mina/trunk/benchmarks/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,124 @@
+/*
+ *  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 static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.NoSuchElementException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.mina.core.BenchmarkFactory.Type;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+@RunWith(Parameterized.class)
+public abstract class BenchmarkBinaryTest {
+    private int numberOfMessages;
+
+    private int port;
+
+    private BenchmarkServer server;
+
+    private BenchmarkClient client;
+
+    private int messageSize;
+
+    private int timeout;
+
+    private byte[] data;
+
+    public BenchmarkBinaryTest(int numberOfMessages, int messageSize, int timeout) {
+        this.numberOfMessages = numberOfMessages;
+        this.messageSize = messageSize;
+        this.timeout = timeout;
+    }
+
+    public abstract Type getClientType();
+
+    public abstract Type getServerType();
+
+    @Parameters
+    public static Collection<Object[]> getParameters() {
+        Object[][] parameters = new Object[][] { { 100000, 10, 2 * 60 }, { 100000, 1 * 1024, 2 * 60 },
+                { 100000, 10 * 1024, 2 * 60 }, { 100, 64 * 1024 * 1024, 10 * 60 } };
+        return Arrays.asList(parameters);
+    }
+
+    public static int getNextAvailable() {
+        ServerSocket serverSocket = null;
+
+        try {
+            // Here, we simply return an available port found by the system
+            serverSocket = new ServerSocket(0);
+            int port = serverSocket.getLocalPort();
+
+            // Don't forget to close the socket...
+            serverSocket.close();
+
+            return port;
+        } catch (IOException ioe) {
+            throw new NoSuchElementException(ioe.getMessage());
+        }
+    }
+
+    @Before
+    public void init() throws IOException {
+        port = getNextAvailable();
+        server = BenchmarkServerFactory.INSTANCE.get(getServerType());
+        server.start(port);
+        client = BenchmarkClientFactory.INSTANCE.get(getClientType());
+        data = new byte[messageSize + 4];
+        data[0] = (byte) (messageSize >>> 24 & 255);
+        data[1] = (byte) (messageSize >>> 16 & 255);
+        data[2] = (byte) (messageSize >>> 8 & 255);
+        data[3] = (byte) (messageSize & 255);
+    }
+
+    @After
+    public void shutdown() throws IOException {
+        client.stop();
+        server.stop();
+    }
+
+    /**
+     * Send "numberOfMessages" messages to a server. Currently, 1 million, with two different
+     * size, 10Ko and 64Ko.
+     */
+    @Test
+    public void benchmark() throws IOException, InterruptedException {
+        CountDownLatch counter = new CountDownLatch(numberOfMessages);
+
+        client.start(port, counter, data);
+        boolean result = counter.await(timeout, TimeUnit.SECONDS);
+        assertTrue("Still " + counter.getCount() + " messages to send on a total of " + numberOfMessages, result);
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkBinaryTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,32 @@
+/*
+ *  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.io.IOException;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public interface BenchmarkClient {
+    public void start(int port, CountDownLatch counter, byte[] data) throws IOException;
+
+    public void stop() throws IOException;
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClient.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,39 @@
+/*
+ *  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;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class BenchmarkClientFactory implements BenchmarkFactory<BenchmarkClient> {
+
+    public static final BenchmarkClientFactory INSTANCE = new BenchmarkClientFactory();
+
+    public BenchmarkClient get(Type type) {
+        switch (type) {
+        case Mina:
+            return new Mina3BenchmarkClient();
+        case Netty:
+            return new NettyBenchmarkClient();
+        default:
+            throw new IllegalArgumentException("Invalid type " + type);
+        }
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,42 @@
+/*
+ *  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;
+
+/**
+ * Common interface for client and server factories
+ * 
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public interface BenchmarkFactory<T> {
+    /**
+     * The different types of providers
+     */
+    public enum Type {
+        Mina, Netty
+    }
+
+    /**
+     * Allocate a provider.
+     * 
+     * @param type the provider type
+     * @return the allocated provider
+     */
+    public T get(Type type);
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,35 @@
+/*
+ *  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.io.IOException;
+
+/**
+ * An interface for a server
+ * 
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public interface BenchmarkServer {
+    /** Starts the server */
+    public void start(int port) throws IOException;
+
+    /** Stops the server */
+    public void stop() throws IOException;
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServer.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,42 @@
+/*
+ *  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;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class BenchmarkServerFactory implements BenchmarkFactory<BenchmarkServer> {
+
+    public static final BenchmarkServerFactory INSTANCE = new BenchmarkServerFactory();
+
+    /**
+     * {@inheritedDoc}
+     */
+    public BenchmarkServer get(org.apache.mina.core.BenchmarkFactory.Type type) {
+        switch (type) {
+        case Mina:
+            return new Mina3BenchmarkServer();
+        case Netty:
+            return null;
+        default:
+            throw new IllegalArgumentException("Invalid type " + type);
+        }
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,111 @@
+/*
+ *  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.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.util.concurrent.CountDownLatch;
+
+import org.apache.mina.api.IdleStatus;
+import org.apache.mina.api.IoHandler;
+import org.apache.mina.api.IoService;
+import org.apache.mina.api.IoSession;
+import org.apache.mina.transport.nio.NioTcpClient;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class Mina3BenchmarkClient implements BenchmarkClient {
+    // The TCP client
+    private NioTcpClient client;
+
+    /**
+     * {@inheritDoc}
+     */
+    public void start(int port, final CountDownLatch counter, final byte[] data) throws IOException {
+        client = new NioTcpClient();
+        client.getSessionConfig().setSendBufferSize(64 * 1024);
+        client.getSessionConfig().setTcpNoDelay(true);
+        client.setIoHandler(new IoHandler() {
+            private void sendMessage(IoSession session, byte[] data) {
+                ByteBuffer iobuf = ByteBuffer.wrap(data);
+                session.write(iobuf);
+            }
+
+            public void sessionOpened(IoSession session) {
+                System.out.println("Client session opened");
+                sendMessage(session, data);
+            }
+
+            public void messageReceived(IoSession session, Object message) {
+                System.out.println("Client message received : " + message);
+                if (message instanceof ByteBuffer) {
+                    ByteBuffer buffer = (ByteBuffer) message;
+                    System.out.println("length=" + buffer.remaining());
+                    for (int i = 0; i < buffer.remaining(); ++i) {
+                        counter.countDown();
+                        long count = counter.getCount();
+                        if (count > 0) {
+                            sendMessage(session, data);
+                            if (count % 10000 == 0) {
+                                System.out.println("Received " + count);
+                            }
+                        }
+                    }
+                }
+            }
+
+            public void exceptionCaught(IoSession session, Throwable cause) {
+                cause.printStackTrace();
+            }
+
+            @Override
+            public void sessionClosed(IoSession session) {
+            }
+
+            @Override
+            public void sessionIdle(IoSession session, IdleStatus status) {
+            }
+
+            @Override
+            public void messageSent(IoSession session, Object message) {
+                System.out.println("Client message sent : " + message);
+            }
+
+            @Override
+            public void serviceActivated(IoService service) {
+            }
+
+            @Override
+            public void serviceInactivated(IoService service) {
+            }
+        });
+
+        client.connect(new InetSocketAddress(port));
+    }
+
+    /**
+     * {@inheritedDoc}
+     */
+    public void stop() throws IOException {
+        client.disconnect();
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkClient.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,163 @@
+/*
+ *  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.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+
+import org.apache.mina.api.IdleStatus;
+import org.apache.mina.api.IoHandler;
+import org.apache.mina.api.IoService;
+import org.apache.mina.api.IoSession;
+import org.apache.mina.session.AttributeKey;
+import org.apache.mina.transport.nio.NioTcpServer;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class Mina3BenchmarkServer implements BenchmarkServer {
+
+    private static enum State {
+        WAIT_FOR_FIRST_BYTE_LENGTH, WAIT_FOR_SECOND_BYTE_LENGTH, WAIT_FOR_THIRD_BYTE_LENGTH, WAIT_FOR_FOURTH_BYTE_LENGTH, READING
+    }
+
+    private static final ByteBuffer ACK = ByteBuffer.allocate(1);
+
+    static {
+        ACK.put((byte) 0);
+        ACK.rewind();
+    }
+
+    private static final AttributeKey<State> STATE_ATTRIBUTE = new AttributeKey<State>(State.class,
+            Mina3BenchmarkServer.class.getName() + ".state");
+
+    private static final AttributeKey<Integer> LENGTH_ATTRIBUTE = new AttributeKey<Integer>(Integer.class,
+            Mina3BenchmarkServer.class.getName() + ".length");
+
+    private NioTcpServer tcpServer;
+
+    /**
+     * {@inheritDoc}
+     */
+    public void start(int port) throws IOException {
+        tcpServer = new NioTcpServer();
+        tcpServer.getSessionConfig().setReceiveBufferSize(128 * 1024);
+        tcpServer.getSessionConfig().setTcpNoDelay(true);
+        tcpServer.setIoHandler(new IoHandler() {
+            public void sessionOpened(IoSession session) {
+                System.out.println("Server session opened");
+                session.setAttribute(STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);
+                State state = session.getAttribute(STATE_ATTRIBUTE);
+
+                if (state == null) {
+                    System.out.println("State is null");
+                }
+
+            }
+
+            public void messageReceived(IoSession session, Object message) {
+                System.out.println("Server Message received : " + message);
+                if (message instanceof ByteBuffer) {
+                    ByteBuffer buffer = (ByteBuffer) message;
+
+                    State state = session.getAttribute(STATE_ATTRIBUTE);
+                    int length = 0;
+
+                    if (session.getAttribute(LENGTH_ATTRIBUTE) != null) {
+                        length = session.getAttribute(LENGTH_ATTRIBUTE);
+                    }
+
+                    while (buffer.remaining() > 0) {
+                        switch (state) {
+                        case WAIT_FOR_FIRST_BYTE_LENGTH:
+                            length = (buffer.get() & 255) << 24;
+                            state = State.WAIT_FOR_SECOND_BYTE_LENGTH;
+                            break;
+                        case WAIT_FOR_SECOND_BYTE_LENGTH:
+                            length += (buffer.get() & 255) << 16;
+                            state = State.WAIT_FOR_THIRD_BYTE_LENGTH;
+                            break;
+                        case WAIT_FOR_THIRD_BYTE_LENGTH:
+                            length += (buffer.get() & 255) << 8;
+                            state = State.WAIT_FOR_FOURTH_BYTE_LENGTH;
+                            break;
+                        case WAIT_FOR_FOURTH_BYTE_LENGTH:
+                            length += (buffer.get() & 255);
+                            state = State.READING;
+                            if ((length == 0) && (buffer.remaining() == 0)) {
+                                session.write(ACK.slice());
+                                state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
+                            }
+                            break;
+                        case READING:
+                            int remaining = buffer.remaining();
+                            if (length > remaining) {
+                                length -= remaining;
+                                buffer.position(buffer.position() + remaining);
+                            } else {
+                                buffer.position(buffer.position() + length);
+                                session.write(ACK.slice());
+                                state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
+                                length = 0;
+                            }
+                        }
+                    }
+                    session.setAttribute(LENGTH_ATTRIBUTE, length);
+                    session.setAttribute(STATE_ATTRIBUTE, state);
+                }
+            }
+
+            public void exceptionCaught(IoSession session, Throwable cause) {
+                cause.printStackTrace();
+            }
+
+            @Override
+            public void sessionClosed(IoSession session) {
+            }
+
+            @Override
+            public void sessionIdle(IoSession session, IdleStatus status) {
+            }
+
+            @Override
+            public void messageSent(IoSession session, Object message) {
+                System.out.println("Server message sent :" + message);
+            }
+
+            @Override
+            public void serviceActivated(IoService service) {
+            }
+
+            @Override
+            public void serviceInactivated(IoService service) {
+            }
+        });
+
+        tcpServer.bind(new InetSocketAddress(port));
+    }
+
+    /**
+     * {@inheritedDoc}
+     */
+    public void stop() throws IOException {
+        tcpServer.unbind();
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3BenchmarkServer.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,67 @@
+/*
+ *  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.Arrays;
+import java.util.Collection;
+
+import org.apache.mina.core.BenchmarkFactory.Type;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class Mina3ClientVsMina3ServerBenchmarkBinaryTest extends BenchmarkBinaryTest {
+
+    /**
+     * @param numberOfMessages
+     * @param messageSize
+     */
+    public Mina3ClientVsMina3ServerBenchmarkBinaryTest(int numberOfMessages, int messageSize, int timeout) {
+        super(numberOfMessages, messageSize, timeout);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Type getClientType() {
+        return Type.Mina;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Type getServerType() {
+        return Type.Mina;
+    }
+    
+    @Parameters
+    public static Collection<Object[]> getParameters() {
+        Object[][] parameters = new Object[][] { 
+                { 200000, 10, 2 * 60 } //, 
+                //{ 1000000, 1 * 1024, 2 * 60 }, 
+                //{ 1000000, 10 * 1024, 2 * 60 },
+                //{ 100, 64 * 1024 * 1024, 10 * 60 }
+        };
+        return Arrays.asList(parameters);
+    }
+}

Propchange: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/Mina3ClientVsMina3ServerBenchmarkBinaryTest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyBenchmarkClient.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyBenchmarkClient.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyBenchmarkClient.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyBenchmarkClient.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,102 @@
+/*
+ *  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.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.concurrent.CountDownLatch;
+
+import org.jboss.netty.bootstrap.ClientBootstrap;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.jboss.netty.channel.ChannelFactory;
+import org.jboss.netty.channel.ChannelHandlerContext;
+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.MessageEvent;
+import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
+import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class NettyBenchmarkClient implements BenchmarkClient {
+
+    private ChannelFactory factory;
+
+    /**
+     * 
+     */
+    public NettyBenchmarkClient() {
+    }
+
+    /**
+     * {@inheritedDoc}
+     */
+    public void start(final int port, final CountDownLatch counter, final byte[] data) throws IOException {
+        factory = new NioClientSocketChannelFactory();
+        ClientBootstrap bootstrap = new ClientBootstrap(factory);
+        bootstrap.setOption("sendBufferSize", 64 * 1024);
+        bootstrap.setOption("tcpNoDelay", true);
+        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
+            public ChannelPipeline getPipeline() throws Exception {
+                return Channels.pipeline(new SimpleChannelUpstreamHandler() {
+                    private void sendMessage(ChannelHandlerContext ctx, byte[] data) {
+                        ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(data);
+                        ctx.getChannel().write(buffer);
+                    }
+
+                    @Override
+                    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
+                        if (e.getMessage() instanceof ChannelBuffer) {
+                            ChannelBuffer buffer = (ChannelBuffer) e.getMessage();
+                            for (int i = 0; i < buffer.readableBytes(); ++i) {
+                                counter.countDown();
+                                if (counter.getCount() > 0) {
+                                    sendMessage(ctx, data);
+                                } else {
+                                    ctx.getChannel().close();
+                                }
+                            }
+                        } else {
+                            throw new IllegalArgumentException(e.getMessage().getClass().getName());
+                        }
+                    }
+
+                    @Override
+                    public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
+                        sendMessage(ctx, data);
+                    }
+
+                });
+            }
+        });
+        bootstrap.connect(new InetSocketAddress(port));
+    }
+
+    /**
+     * {@inheritedDoc}
+     */
+    public void stop() throws IOException {
+        factory.releaseExternalResources();
+    }
+}

Added: mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyClientVsMinaServerBenchmarkBinaryTest.java
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyClientVsMinaServerBenchmarkBinaryTest.java?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyClientVsMinaServerBenchmarkBinaryTest.java (added)
+++ mina/mina/trunk/benchmarks/src/test/java/org/apache/mina/core/NettyClientVsMinaServerBenchmarkBinaryTest.java Fri Jan  4 00:40:46 2013
@@ -0,0 +1,74 @@
+/*
+ *  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.Arrays;
+import java.util.Collection;
+
+import org.apache.mina.core.BenchmarkFactory.Type;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ */
+public class NettyClientVsMinaServerBenchmarkBinaryTest
+    extends BenchmarkBinaryTest {
+
+    /**
+     * @param numberOfMessages
+     * @param messageSize
+     */
+    public NettyClientVsMinaServerBenchmarkBinaryTest( int numberOfMessages, int messageSize, int timeout ) {
+        super( numberOfMessages, messageSize, timeout );
+    }
+
+    /** {@inheritDoc}
+     */
+    @Override
+    public Type getClientType() {
+        return Type.Netty;
+    }
+
+    /** {@inheritDoc}
+     */
+    @Override
+    public Type getServerType() {
+        return Type.Mina;
+    }
+    
+    //TODO: analyze with Netty is so slow on large message: last test lower to 100 messages
+    @Parameters
+    public static Collection<Object[]> getParameters() {
+        Object[][] parameters = new Object[][] { 
+            { 200000, 10, 2 * 60 } //, 
+            //{ 1000000, 1 * 1024, 2 * 60 }, 
+            //{ 1000000, 10 * 1024, 2 * 60 },
+            //{ 100, 64 * 1024 * 1024, 10 * 60 }
+    };
+        /*
+        Object[][] parameters = new Object[][] { 
+                { 1000000, 10, 2 * 60 }, 
+                { 1000000, 1 * 1024, 2 * 60 }, 
+                { 1000000, 10 * 1024, 2 * 60 },
+                { 100, 64 * 1024 * 1024, 10 * 60 }
+        };*/
+        return Arrays.asList(parameters);
+    }
+}

Added: mina/mina/trunk/benchmarks/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/mina/mina/trunk/benchmarks/src/test/resources/log4j.properties?rev=1428685&view=auto
==============================================================================
--- mina/mina/trunk/benchmarks/src/test/resources/log4j.properties (added)
+++ mina/mina/trunk/benchmarks/src/test/resources/log4j.properties Fri Jan  4 00:40:46 2013
@@ -0,0 +1,23 @@
+#############################################################################
+#    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.
+#############################################################################
+log4j.rootCategory=DEBUG, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+
+

Propchange: mina/mina/trunk/benchmarks/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:executable = *