diff options
Diffstat (limited to 'plugins/cdo/benchmarks')
26 files changed, 2007 insertions, 0 deletions
diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath new file mode 100755 index 00000000..3e5654f1 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.classpath @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project new file mode 100755 index 00000000..cda13e66 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.cdo.benchmarks</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 00000000..e82ec2bb --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,294 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +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=0 +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_lambda_body=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=true +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=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +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=260 +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=4 +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=do not 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_after_type_annotation=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_lambda_arrow=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_lambda_arrow=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=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +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 diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs new file mode 100755 index 00000000..ce7d5191 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx Binary files differnew file mode 100755 index 00000000..a891faea --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/Benchmarks results.xlsx diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF new file mode 100755 index 00000000..a9560d90 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Papyrus CDO Integration Perfo Tests +Bundle-SymbolicName: org.eclipse.papyrus.cdo.benchmarks +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Eclipse Modeling Project +Automatic-Module-Name: org.eclipse.papyrus.cdo.perfo.tests +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.junit, + org.eclipse.gmf.runtime.notation;bundle-version="1.8.0", + org.eclipse.papyrus.infra.gmfdiag.style;bundle-version="1.0.0", + org.eclipse.papyrus.cdo.core.tests;bundle-version="1.2.0", + org.eclipse.papyrus.uml.tools;bundle-version="4.1.0", + org.eclipse.papyrus.uml.diagram.wizards;bundle-version="3.1.0", + org.eclipse.net4j.tcp, + org.eclipse.emf.transaction;bundle-version="1.9.1", + org.eclipse.papyrus.uml.service.types;bundle-version="4.1.0", + org.eclipse.uml2.uml;bundle-version="5.4.0", + org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.3.0", + org.eclipse.papyrus.infra.types.core;bundle-version="4.0.0", + org.eclipse.papyrus.sysml14.service.types;bundle-version="1.3.0", + org.eclipse.papyrus.infra.architecture;bundle-version="2.0.0" +Bundle-ActivationPolicy: lazy diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README new file mode 100755 index 00000000..fe387e24 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/README @@ -0,0 +1,8 @@ +This plugin has been created to get time creation using pure Papyrus and Papyrus on CDO. +To execute them, you need to launch a CDO server on your computer, with the expected parameter +user:Administrator +Password: 0000 +host and port : localhost:2036 +repo name : PapyrusCDOSecuredRepository + +These tests have been developed on Eclipse 2018.09
\ No newline at end of file diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html new file mode 100755 index 00000000..997c5a22 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>November 30, 2017</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties new file mode 100755 index 00000000..34d2e4d2 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml new file mode 100755 index 00000000..de7a816d --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/pom.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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 of this POM --> + <parent> + <groupId>org.eclipse.papyrus.cdo</groupId> + <artifactId>org.eclipse.papyrus.cdo-benchmarks</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <!-- Project POM --> + <artifactId>org.eclipse.papyrus.cdo.benchmarks</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java new file mode 100755 index 00000000..a0233525 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractModelCreation.java @@ -0,0 +1,273 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.papyrus.infra.architecture.ArchitectureDescriptionUtils; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; +import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; +import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.core.services.ServiceMultiException; +import org.eclipse.papyrus.infra.core.services.ServicesRegistry; +import org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand; +import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile; +import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile; +import org.eclipse.papyrus.uml.tools.commands.ApplyProfileCommand; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.UMLFactory; + +/** + * @author VL222926 + * + */ +public abstract class AbstractModelCreation implements IPapyrusModelCreation { + + + protected ServicesRegistry servicesRegistry; + + protected ModelSet modelSet; + + + public ModelSet getModelSet() { + return this.modelSet; + } + + private URI diURi = null; + + private Resource umlResource; + + private Model rootModel; + + private List<String> profilesToApply; + + protected void createModelSet(final String folderName, final String modelName, final List<String> profilesToApply) throws IOException, ServiceException { + if (null == profilesToApply) { + this.profilesToApply = Collections.emptyList(); + } else { + this.profilesToApply = profilesToApply; + } + servicesRegistry = createServicesRegistry(); + Assert.isNotNull(servicesRegistry); + + + this.modelSet = servicesRegistry.getService(ModelSet.class); + Assert.isNotNull(this.modelSet); + + + + diURi = createBaseURI(); + if (null == diURi) { + diURi = URI.createPlatformResourceURI(folderName, true); + } else { + diURi = diURi.appendSegment(folderName); + } + diURi = diURi.appendSegment(modelName); + diURi = diURi.appendFileExtension(DiModel.MODEL_FILE_EXTENSION); + + RecordingCommand command = new NewPapyrusModelCommand(this.modelSet, diURi); + + modelSet.getTransactionalEditingDomain().getCommandStack().execute(command); + modelSet.save(new NullProgressMonitor()); + final URI umlURi = diURi.trimFileExtension().appendFileExtension("uml"); + umlResource = modelSet.getResource(umlURi, true); + + + // create the architecture context + ArchitectureDescriptionUtils helper = new ArchitectureDescriptionUtils(modelSet); + + + final String contextId; + final List<String> viewpointsIds = new ArrayList<String>(); + if (profilesToApply.contains("SysML 1.4")) { + contextId = "org.eclipse.papyrus.sysml.architecture.SysML14"; + viewpointsIds.add("org.eclipse.papyrus.sysml14.standard.modeling"); + } else { + // we assume we are in pure UML + contextId = "org.eclipse.papyrus.infra.services.edit.TypeContext"; + viewpointsIds.add("org.eclipse.papyrus.uml.analysis"); + viewpointsIds.add("org.eclipse.papyrus.uml.design"); + } + // CompoundCommand cc = new CompoundCommand(); + // final Command cmd1 = helper.switchArchitectureContextId(contextId); + // cc.append(cmd1); + String[] stringsViewPointIds = new String[viewpointsIds.size()]; + stringsViewPointIds = viewpointsIds.toArray(stringsViewPointIds); + // final Command cmd2 = helper.switchArchitectureViewpointIds(stringsViewPointIds); + // cc.append(cmd2); + + modelSet.getTransactionalEditingDomain().getCommandStack().execute(helper.createNewModel(contextId, stringsViewPointIds)); + modelSet.save(new NullProgressMonitor()); + + + Assert.isNotNull(umlResource); + final Model model = (Model) umlResource.getContents().get(0); + // UMLFactory.eINSTANCE.createModel(); + // model.setName(modelName); + + RecordingCommand rc = new RecordingCommand(modelSet.getTransactionalEditingDomain()) { + + @Override + protected void doExecute() { + model.setName(modelName); + // umlResource.getContents().add(model); + } + }; + + modelSet.getTransactionalEditingDomain().getCommandStack().execute(rc); + rootModel = model; + initServicesRegistry(servicesRegistry);// we need to have a root in the model to init it!?!? + + + modelSet.save(new NullProgressMonitor()); + if (this.profilesToApply.size() > 0) { + applyRequiredProfilesFromName(getProfilesToApply()); + modelSet.save(new NullProgressMonitor()); + } + + + } + + protected void createModelSet(final String folderName, final String modelName) throws IOException, ServiceException { + createModelSet(folderName, modelName, Collections.<String> emptyList()); + + } + + protected void applyRequiredProfilesFromName(final List<String> profileNames) { + if (profileNames.size() >= 0) { + final List<Profile> profilesToApply = new ArrayList<Profile>(); + for (final String current : profileNames) { + IRegisteredProfile profile = RegisteredProfile.getRegisteredProfile(current); + org.junit.Assert.assertNotNull(profile); + URI uri = profile.getUri(); + Resource resource = modelSet.getResource(uri, true); + Profile profileToApply = (Profile) resource.getContents().get(0); + org.junit.Assert.assertNotNull(profileToApply); + profilesToApply.add(profileToApply); + } + applyRequiredProfiles(profilesToApply); + } + } + + protected void applyRequiredProfiles(final List<Profile> profiles) { + if (profiles.size() > 0) { + final CompoundCommand cc = new CompoundCommand("Apply Profiles"); + for (Profile current : profiles) { + cc.append(new ApplyProfileCommand(rootModel, current, modelSet.getTransactionalEditingDomain())); + } + modelSet.getTransactionalEditingDomain().getCommandStack().execute(cc); + org.junit.Assert.assertTrue(profiles.size() <= rootModel.getAppliedProfiles().size()); + } + } + + protected List<String> getProfilesToApply() { + return this.profilesToApply; + } + + /** + * @throws ServiceMultiException + * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#disposeAll() + * + */ + @Override + public void disposeAll() throws ServiceMultiException { + this.modelSet.unload(); + this.modelSet = null; + this.servicesRegistry.disposeRegistry(); + this.servicesRegistry = null; + } + + /** + * @return + */ + protected abstract URI createBaseURI(); + + /** + * + * + * TODO : duplicated code from CreateModelWizard + * + * + * @return + */ + protected ServicesRegistry createServicesRegistry() { + ServicesRegistry result = null; + + try { + result = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID); + } catch (ServiceException e) { + // couldn't create the registry? Fatal problem + // Activator.log.error(e); //TODO + } + + try { + // have to create the model set and populate it with the DI model + // before initializing other services that actually need the DI + // model, such as the SashModel Manager service + result.startServicesByClassKeys(ModelSet.class); + } catch (ServiceException ex) { + // Ignore this exception: some services may not have been loaded, + // which is probably normal at this point + } + + return result; + } + + /** + * + * + * TODO : duplicated code from CreateModelWizard + * + * + * @return + */ + protected void initServicesRegistry(ServicesRegistry registry) throws ServiceException { + try { + registry.startRegistry(); + } catch (ServiceException ex) { + // Ignore this exception: some services may not have been loaded, + // which is probably normal at this point + } + + registry.getService(IPageManager.class); + } + + public ServicesRegistry getServicesRegistry() { + return this.servicesRegistry; + } + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#getModelRoot() + * + * @return + */ + @Override + public Model getModelRoot() { + return this.rootModel; + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java new file mode 100755 index 00000000..769162ce --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractPerfTest.java @@ -0,0 +1,92 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.sysml14.service.types.util.SysMLServiceTypeUtil; +import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes; +import org.junit.Assert; +import org.junit.Test; + +/** + * @author VL222926 + * + */ +public abstract class AbstractPerfTest extends AbstractPapyrusTest { + + + + + protected void runCreation(List<String> profilesToApply, IHintedType elementTypeToCreate, final int nbElementsToCreate) throws Exception { + IPapyrusModelCreation helper = createPapyrusModelCreation(); + if(null==profilesToApply) { + profilesToApply = Collections.<String>emptyList(); + } + final ExecutionTimeHelper timeHelper = createTimeExecutionHelper(nbElementsToCreate, elementTypeToCreate); + ModelConstructor<IPapyrusModelCreation> test = new ModelConstructor<IPapyrusModelCreation>(helper, timeHelper); + test.createElementsInModel(Long.toString(System.currentTimeMillis()), nbElementsToCreate, elementTypeToCreate, profilesToApply); + timeHelper.toString(); + } + + protected abstract IPapyrusModelCreation createPapyrusModelCreation(); + + protected abstract ExecutionTimeHelper createTimeExecutionHelper(final int nbElementsToCreate, IHintedType elementType); + + +// +// @Test +// public void create_100_Classes() throws Exception { +// runCreation(null, UMLElementTypes.CLASS, 100); +// } +// +// @Test +// public void create_1000_Classes() throws Exception { +// runCreation(null, UMLElementTypes.CLASS, 1000); +// } + + @Test + public void create_10000_Classes() throws Exception { + runCreation(null, UMLElementTypes.CLASS, 10000); + } + + +// @Test +// public void create_1000_Blocks() throws Exception { +// Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK); +// Assert.assertTrue(value instanceof IHintedType); +// runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 1000); +// } + + @Test + public void create_10000_Blocks() throws Exception { + Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK); + Assert.assertTrue(value instanceof IHintedType); + runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 10000); + } + +// @Test +// public void create_50000_Blocks() throws Exception { +// Object value = ElementTypeRegistry.getInstance().getType(SysMLServiceTypeUtil.ORG_ECLIPSE_PAPYRUS_SYSML14_BLOCK); +// Assert.assertTrue(value instanceof IHintedType); +// runCreation(Collections.<String> singletonList("SysML 1.4"), (IHintedType) value, 50000); +// } + + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java new file mode 100755 index 00000000..339dcbf6 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractQuickIndexCreationTest.java @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry; +import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NameElementNamingStrategyPreferenceInitializer; +import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NamedElementIndexNamingStrategyEnum; +import org.junit.AfterClass; +import org.junit.BeforeClass; + + +/** + * @author VL222926 + * + */ +public abstract class AbstractQuickIndexCreationTest extends AbstractPerfTest { + + protected static final ExecutionTimeHelperMerger merger = new ExecutionTimeHelperMerger("Time for creation with quick index"); + + @BeforeClass + public static final void initTest() { + // we need to initialize it before usingUMLElementTypes.CLASS, because, it is Papyrus that fills the GMF registry used by UMLElementTypes.CLASS. + // without doing that, the value will be null + ElementTypeSetConfigurationRegistry.getInstance(); + + IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore(); + store.setValue(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION, NamedElementIndexNamingStrategyEnum.QUICK_INDEX_INITIALIZATION.toString()); + } + + + @AfterClass + public static final void endTest() { + IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore(); + store.setToDefault(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION); + + if (merger.isFull()) { + System.out.println(merger.toString()); + } + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java new file mode 100755 index 00000000..dd7b5408 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/AbstractUniqueIndexCreationTest.java @@ -0,0 +1,60 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.Collections; + +import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry; +import org.eclipse.papyrus.sysml14.service.types.util.SysMLServiceTypeUtil; +import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NameElementNamingStrategyPreferenceInitializer; +import org.eclipse.papyrus.uml.tools.utils.internal.preferences.NamedElementIndexNamingStrategyEnum; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + + +/** + * @author VL222926 + * + */ +public abstract class AbstractUniqueIndexCreationTest extends AbstractPerfTest { + + protected static final ExecutionTimeHelperMerger merger = new ExecutionTimeHelperMerger("Time for creation with unique index"); + + + @BeforeClass + public static final void initTest() { + + // we need to initialize it before usingUMLElementTypes.CLASS, because, it is Papyrus that fills the GMF registry used by UMLElementTypes.CLASS. + // without doing that, the value will be null + ElementTypeSetConfigurationRegistry.getInstance(); + IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore(); + store.setValue(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION, NamedElementIndexNamingStrategyEnum.UNIQUE_INDEX_INITIALIZATION.toString()); + } + + + @AfterClass + public static final void endTest() { + IPreferenceStore store = org.eclipse.papyrus.uml.tools.utils.Activator.getDefault().getPreferenceStore(); + store.setToDefault(NameElementNamingStrategyPreferenceInitializer.NAMED_ELEMENT_INDEX_INITIALIZATION); + if (merger.isFull()) { + System.out.println(merger.toString()); + } + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java new file mode 100755 index 00000000..bba51861 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOPapyrusModelCreation.java @@ -0,0 +1,208 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.List; +import java.util.Properties; + +import org.eclipse.emf.cdo.common.branch.CDOBranch; +import org.eclipse.emf.cdo.common.branch.CDOBranchPoint; +import org.eclipse.emf.cdo.explorer.CDOExplorerUtil; +import org.eclipse.emf.cdo.explorer.checkouts.CDOCheckout; +import org.eclipse.emf.cdo.explorer.repositories.CDORepository; +import org.eclipse.emf.cdo.internal.explorer.AbstractElement; +import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutImpl; +import org.eclipse.emf.cdo.internal.explorer.repositories.CDORepositoryImpl; +import org.eclipse.emf.cdo.internal.explorer.repositories.RemoteCDORepository; +import org.eclipse.emf.cdo.net4j.CDONet4jSessionConfiguration; +import org.eclipse.emf.cdo.net4j.CDONet4jUtil; +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.transaction.CDOTransaction; +import org.eclipse.emf.common.util.URI; +import org.eclipse.net4j.Net4jUtil; +import org.eclipse.net4j.connector.IConnector; +import org.eclipse.net4j.tcp.TCPUtil; +import org.eclipse.net4j.util.container.ContainerUtil; +import org.eclipse.net4j.util.container.IManagedContainer; +import org.eclipse.net4j.util.security.IPasswordCredentialsProvider; +import org.eclipse.net4j.util.security.PasswordCredentialsProvider; +import org.eclipse.papyrus.infra.core.services.ServiceMultiException; + +/** + * @author VL222926 + * + */ +public class CDOPapyrusModelCreation extends AbstractModelCreation { + + private static final String HOST_AND_PORT = "localhost:2036"; + + private static final String USER_NAME = "Administrator"; + + private static final String PASSWORD = "0000"; + + + private CDOSession session; + private CDOCheckout checkout; + private CDORepository repository; + private CDOTransaction transaction; + + final String PAPYRUS_CDO_SECURED_REPOSITORY = "PapyrusCDOSecuredRepository"; + + + + public final void connect() throws Exception { + connect(getHostAndPort(), getUser(), getPassword()); + } + + /** + * @return + */ + private String getPassword() { + return PASSWORD; + } + + /** + * @return + */ + private String getUser() { + return USER_NAME; + } + + /** + * @return + */ + private String getHostAndPort() { + return HOST_AND_PORT; + } + + private void connect(final String serverURI, final String login, final String password) throws Exception { + try { + // Prepare container + final IManagedContainer container = ContainerUtil.createContainer(); + Net4jUtil.prepareContainer(container); // Register Net4j factories + TCPUtil.prepareContainer(container); // Register TCP factories + CDONet4jUtil.prepareContainer(container); // Register CDO factories + container.activate(); + + // Create connector + final IConnector connector = TCPUtil.getConnector(container, serverURI); + + // Create configuration + final CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration(); + configuration.setConnector(connector); + configuration.setRepositoryName(PAPYRUS_CDO_SECURED_REPOSITORY); + final IPasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(login, password); + configuration.setCredentialsProvider(credentialsProvider); + + final Properties properties = new Properties(); + + properties.setProperty(AbstractElement.PROP_TYPE, CDORepository.TYPE_REMOTE); + properties.setProperty(AbstractElement.PROP_LABEL, PAPYRUS_CDO_SECURED_REPOSITORY); + properties.setProperty(CDORepositoryImpl.PROP_NAME, PAPYRUS_CDO_SECURED_REPOSITORY); + properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_TYPE, "tcp"); //$NON-NLS-1$ + // TODO : is it serverURI? + properties.setProperty(RemoteCDORepository.PROP_CONNECTOR_DESCRIPTION, serverURI); + + repository = CDOExplorerUtil.getRepositoryManager().addRepository(properties, credentialsProvider.getCredentials()); + repository.connect(); + + // Open session + session = configuration.openNet4jSession(); + + this.checkout = createCheckout("PapyrusPerfoTestCheckout"); //$NON-NLS-1$ + + + } catch (final Exception e) { + throw e; + } + + } + + private CDOCheckout createCheckout(final String checkoutName) { + final Properties properties = new Properties(); + properties.setProperty(AbstractElement.PROP_TYPE, CDOCheckout.TYPE_ONLINE_HISTORICAL); + properties.setProperty(AbstractElement.PROP_LABEL, checkoutName); + properties.setProperty(CDOCheckoutImpl.PROP_REPOSITORY, this.repository.getID()); + properties.setProperty(CDOCheckoutImpl.PROP_BRANCH_ID, Integer.toString(CDOBranch.MAIN_BRANCH_ID)); + properties.setProperty(CDOCheckoutImpl.PROP_TIME_STAMP, Long.toString(CDOBranchPoint.UNSPECIFIED_DATE)); + properties.setProperty(CDOCheckoutImpl.PROP_READ_ONLY, Boolean.toString(false)); + + final CDOCheckout checkout = CDOExplorerUtil.getCheckoutManager().addCheckout(properties); + checkout.open(); + return checkout; + } + + /** + * Gets the running session. + * + * @return the running session + */ + protected CDOSession getSession() { + return this.session; + } + + + + public CDOTransaction getOpenTransaction() { + if (transaction != null) { + return transaction; + } + + transaction = session.openTransaction(this.modelSet); + + + return transaction; + } + + + public void closeTransaction() { + if (null != this.transaction) { + this.transaction.close(); + } + transaction = null;// TODO : probably missing in QS + } + + + /** + * @see org.eclipse.papyrus.cdo.perfo.tests.impl.IPapyrusModelCreation#initPapyrusEnvironnement(java.lang.String, java.lang.String, List<String>) + * + * @param folderName + * @param modelName + * @throws Exception + */ + @Override + public void initPapyrusEnvironnement(final String folderName, final String modelName, final List<String> profilesName) throws Exception { + connect(); + createModelSet(folderName, modelName, profilesName); + } + + + protected URI createBaseURI() { + URI uri = URI.createURI("cdo.checkout://1/home"); + return uri.appendSegment(getUser()); + + } + + /** + * @throws ServiceMultiException + * @see org.eclipse.papyrus.cdo.benchmarks.tests.IPapyrusModelCreation#disposeAll() + * + */ + @Override + public void disposeAll() throws ServiceMultiException { + closeTransaction(); + super.disposeAll(); + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java new file mode 100755 index 00000000..8a857580 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOQuickIndexCreationTest.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; + +/** + * @author VL222926 + * + */ +public class CDOQuickIndexCreationTest extends AbstractQuickIndexCreationTest { + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation() + * + * @return + */ + @Override + protected IPapyrusModelCreation createPapyrusModelCreation() { + return new CDOPapyrusModelCreation(); + } + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType) + * + * @param nbClasses + * @return + */ + @Override + protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) { + final String id = elementType.getId(); + ExecutionTimeHelper helper = new ExecutionTimeHelper("CDO Project: Create " + nbClasses + " " + id + " with quick Index.", ExecutionTimeHelper.CDO_TYPE, nbClasses, id); + merger.addTimeHelper(helper); + return helper; + } + + + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java new file mode 100755 index 00000000..3f40873b --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/CDOUniqueIndexCreationTest.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; + +/** + * @author VL222926 + * + */ +public class CDOUniqueIndexCreationTest extends AbstractUniqueIndexCreationTest { + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation() + * + * @return + */ + @Override + protected IPapyrusModelCreation createPapyrusModelCreation() { + return new CDOPapyrusModelCreation(); + } + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType) + * + * @param nbClasses + * @return + */ + @Override + protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) { + final String id = elementType.getId(); + ExecutionTimeHelper helper = new ExecutionTimeHelper("CDO Project: Create " + nbClasses + " " + id + " with Unique Index.", ExecutionTimeHelper.CDO_TYPE, nbClasses, id); + merger.addTimeHelper(helper); + return helper; + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java new file mode 100755 index 00000000..9a6730ba --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelper.java @@ -0,0 +1,144 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; + +import org.eclipse.osgi.framework.util.ArrayMap; +import org.junit.Assert; + +/** + * @author VL222926 + * + */ +public class ExecutionTimeHelper { + + public static final String STEP_1 = "Step 1 : Creating Model Set"; + public static final String STEP_2 = "Step 2 : Creating elements"; + public static final String STEP_3 = "Step 3 : Saving the model"; + public static final String STEP_4 = "Step 4 : Accessing Element"; + public static final String STEP_5 = "Step 5 : Accessing 5 000th Element"; + public static final String STEP_6 = "Step 6 : Get stereotype application on 5 000th Element"; + public static final String STEP_7 = "Step 7 : Add 100 elements to the root of the resource"; + + + public static final String CDO_TYPE = "CDO Type"; + + public static final String Papyrus_TYPE = "Papyrus Type"; + + private String title; + + private String type; + + private int nbElementToCreate; + + private Map<String, List<Long>> count = new HashMap<String, List<Long>>(); + + private List<Long> currentList = null; + + private static final String NEWLINE = "\n"; + + private String createdElement; + + public String getElementType() { + return this.createdElement; + } + + public ExecutionTimeHelper(final String title, final String type, final int nbElementToCreate, String createdElement) { + this.title = title; + this.type = type; + this.nbElementToCreate = nbElementToCreate; + this.createdElement = createdElement; + } + + public void startCounting(final String step) { + Assert.assertNull("The stop method has not been called", currentList); + currentList = new LinkedList<Long>(); + count.put(step, currentList); + currentList.add(System.currentTimeMillis()); + } + + + public void top() { + currentList.add(System.currentTimeMillis()); + } + + public void stop() { + currentList.add(System.currentTimeMillis()); + currentList = null; + } + + public String getType() { + return this.type; + } + + /** + * @see java.lang.Object#toString() + * + * @return + */ + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + builder.append("------"); + builder.append(title); + builder.append("------"); + builder.append(NEWLINE); + final Iterator<Entry<String, List<Long>>> iter = count.entrySet().iterator(); + while (iter.hasNext()) { + final Entry<String, List<Long>> current = iter.next(); + builder.append("# "); + builder.append(current.getKey()); + builder.append(NEWLINE); + builder.append("## "); + for (int i = 0; i < current.getValue().size() - 1; i++) { + long diff = current.getValue().get(i + 1) - current.getValue().get(i); + builder.append(diff); + builder.append(NEWLINE); + } + builder.append(NEWLINE); + builder.append(NEWLINE); + } + + return builder.toString(); + } + + + public Map<String, List<Long>> getCount() { + return this.count; + } + + + public List<Long> getValuesForStep(final String step) { + return this.count.get(step); + } + + + /** + * @return + */ + public int getNbCreation() { + return this.nbElementToCreate; + } + +} + + diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java new file mode 100755 index 00000000..83dadb0a --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ExecutionTimeHelperMerger.java @@ -0,0 +1,162 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import junit.framework.Assert; + +/** + * @author VL222926 + * + */ +public class ExecutionTimeHelperMerger { + + private String testResultDescription; + + public ExecutionTimeHelperMerger(final String testResultDescription) { + this.testResultDescription = testResultDescription; + } + + // nb elements created, elementTypeID, execution + private Map<Integer, Map<String, List<ExecutionTimeHelper>>> timeHelperMap = new HashMap<Integer, Map<String, List<ExecutionTimeHelper>>>(); + + + + public void addTimeHelper(final ExecutionTimeHelper helper) { + int nbCreatedElement = helper.getNbCreation(); + Map<String, List<ExecutionTimeHelper>> subMap = timeHelperMap.get(Integer.valueOf(nbCreatedElement)); + if (null == subMap) { + subMap = new HashMap<String, List<ExecutionTimeHelper>>(); + subMap.put(helper.getElementType(), new ArrayList<ExecutionTimeHelper>()); + timeHelperMap.put(Integer.valueOf(nbCreatedElement), subMap); + } + + List<ExecutionTimeHelper> helpers = subMap.get(helper.getElementType()); + if (null == helpers) { + helpers = new ArrayList<ExecutionTimeHelper>(); + subMap.put(helper.getElementType(), helpers); + } + helpers.add(helper); + } + + public boolean isFull() { + final Iterator<Entry<Integer, Map<String, List<ExecutionTimeHelper>>>> iter = timeHelperMap.entrySet().iterator(); + while (iter.hasNext()) { + final Entry<Integer, Map<String, List<ExecutionTimeHelper>>> current = iter.next(); + final Map<String, List<ExecutionTimeHelper>> curr = current.getValue(); + final Iterator<Entry<String, List<ExecutionTimeHelper>>> iter2 = curr.entrySet().iterator(); + while (iter2.hasNext()) { + if (2 != iter2.next().getValue().size()) { + return false; + } + } + + } + return true; + } + + + /** + * @see java.lang.Object#toString() + * + * @return + */ + @Override + public String toString() { + final List<Integer> keys = new ArrayList<Integer>(timeHelperMap.keySet()); + Collections.sort(keys); + + final StringBuilder builder = new StringBuilder(testResultDescription); + builder.append("\n"); + for (int i = 0; i < keys.size(); i++) { + ExecutionTimeHelper papyrusTimeHelper; + ExecutionTimeHelper CDOTimeHelper; + Map<String, List<ExecutionTimeHelper>> subMap = timeHelperMap.get(keys.get(i)); + final Iterator<Entry<String, List<ExecutionTimeHelper>>> subIter = subMap.entrySet().iterator(); + while (subIter.hasNext()) { + final Entry<String, List<ExecutionTimeHelper>> current = subIter.next(); + + List<ExecutionTimeHelper> helpers = current.getValue(); + if (ExecutionTimeHelper.CDO_TYPE.equals(helpers.get(0).getType())) { + CDOTimeHelper = helpers.get(0); + papyrusTimeHelper = helpers.get(1); + } else { + CDOTimeHelper = helpers.get(1); + papyrusTimeHelper = helpers.get(0); + } + + + builder.append("Creating " + keys.get(i) + " " + current.getKey()); + builder.append("\n"); + + builder.append(" "); + builder.append("\t"); + builder.append(ExecutionTimeHelper.Papyrus_TYPE); + builder.append("\t"); + builder.append(ExecutionTimeHelper.CDO_TYPE); + builder.append("\n"); + + builder.append(createStepsRows(ExecutionTimeHelper.STEP_1, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_2, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_3, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_4, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_5, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_6, papyrusTimeHelper, CDOTimeHelper)); + builder.append(createStepsRows(ExecutionTimeHelper.STEP_7, papyrusTimeHelper, CDOTimeHelper)); + + } + } + return builder.toString(); + } + + + private String createStepsRows(final String step, final ExecutionTimeHelper papyrusHelper, final ExecutionTimeHelper cdoHelper) { + final StringBuilder builder = new StringBuilder(step); + builder.append("\t"); + builder.append(" "); + builder.append("\t"); + builder.append(" "); + builder.append("\n"); + + builder.append(createValueList(papyrusHelper.getValuesForStep(step), cdoHelper.getValuesForStep(step))); + builder.append("\n"); + + return builder.toString(); + } + + private String createValueList(final List<Long> papyrusValues, final List<Long> cdoValues) { + if (papyrusValues != null && cdoValues != null) { + final StringBuilder builder = new StringBuilder(); + org.junit.Assert.assertEquals(papyrusValues.size(), cdoValues.size()); + for (int i = 0; i < papyrusValues.size() - 1; i++) { + builder.append(" "); + builder.append("\t"); + builder.append(Long.valueOf(papyrusValues.get(i + 1) - papyrusValues.get(i)) + "ms"); + builder.append("\t"); + builder.append(Long.valueOf(cdoValues.get(i + 1) - cdoValues.get(i)) + "ms"); + builder.append("\n"); + } + return builder.toString(); + } + return ""; + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java new file mode 100755 index 00000000..f5dd6420 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/IPapyrusModelCreation.java @@ -0,0 +1,68 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.List; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.services.ServiceMultiException; +import org.eclipse.papyrus.infra.core.services.ServicesRegistry; +import org.eclipse.uml2.uml.Model; + +/** + * @author VL222926 + * + */ +public interface IPapyrusModelCreation { + + /** + * This methods creates: + * <ul> + * <li>the Papyrus service registry</li> + * <li>the ModelSet</li> + * <li>all the required Papyrus files (uml, notation, di and others)</li> + * + * </ul> + * + * @param folderName + * the name of the folder where the files will be created + * @param modelName + * the name of the root model + * @param profilesName TODO + * @throws Exception + */ + public void initPapyrusEnvironnement(final String folderName, final String modelName, List<String> profilesName) throws Exception; + + /** + * + * @return + * the created {@link ModelSet} or <code>null</code> + */ + public ModelSet getModelSet(); + + /** + * + * @return + * the created {@link ServicesRegistry} or <code>null</code> + */ + public ServicesRegistry getServicesRegistry(); + + public void disposeAll() throws ServiceMultiException; + + public Model getModelRoot(); + + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java new file mode 100755 index 00000000..2a0106ee --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/ModelConstructor.java @@ -0,0 +1,175 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; +import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.UMLFactory; + +/** + * @author VL222926 + * + */ +public class ModelConstructor<T extends IPapyrusModelCreation> { + + private T creationHelper; + + protected ExecutionTimeHelper timeHelper; + + public ModelConstructor(final T creationHelper, final ExecutionTimeHelper timeHelper) { + this.creationHelper = creationHelper; + this.timeHelper = timeHelper; + } + + + /** + * r + * + * @param folderName + * @param nbElementsToCreate + * @param elementType + * @param profilesName + * @throws Exception + */ + public void createElementsInModel(final String folderName, int nbElementsToCreate, IHintedType elementType, List<String> profilesName) throws Exception { + + String modelName = Long.toString(System.currentTimeMillis()); + + // creating model set + timeHelper.startCounting(ExecutionTimeHelper.STEP_1); + this.creationHelper.initPapyrusEnvironnement(folderName, modelName, profilesName); + timeHelper.stop(); + + Assert.isNotNull(creationHelper.getServicesRegistry()); + Assert.isNotNull(creationHelper.getModelSet()); + + // creating classes + final Model model = this.creationHelper.getModelRoot(); + final ModelSet modelSet = this.creationHelper.getModelSet(); + + + final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(model); + int modulo = 100; + timeHelper.startCounting(ExecutionTimeHelper.STEP_2); + for (int i = 0; i < nbElementsToCreate; i++) { + CreateElementRequest request = new CreateElementRequest(modelSet.getTransactionalEditingDomain(), model, elementType); + final ICommand cmd = provider.getEditCommand(request); + modelSet.getTransactionalEditingDomain().getCommandStack().execute(GMFtoEMFCommandWrapper.wrap(cmd)); + if (i % modulo == 0) { + timeHelper.top(); + } + } + + timeHelper.stop(); + + // saving the models + timeHelper.startCounting(ExecutionTimeHelper.STEP_3); + try { + modelSet.save(new NullProgressMonitor()); + // modelSet. + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + timeHelper.stop(); + + + // accessing to an element + List<String> names = Arrays.asList(elementType.getId().split("\\.")); + Collections.reverse(names); + String name = names.get(0); + int i = 0; + timeHelper.startCounting(ExecutionTimeHelper.STEP_4); + while (i + modulo <= nbElementsToCreate) { + i = i + modulo; + final NamedElement element = model.getMember(name + i); + // TODO ! + Assert.isNotNull(element); + if (profilesName.size() > 0) { + Assert.isTrue(element.getAppliedStereotypes().size() > 0); + } + timeHelper.top(); + } + + timeHelper.stop(); + + name = name + "5000"; + NamedElement element = null; + if (nbElementsToCreate > 5000) { + timeHelper.startCounting(ExecutionTimeHelper.STEP_5); + for (int j = 0; j < 100; j++) {// we do it 100 times + element = model.getMember(name); + } + timeHelper.stop(); + } + + if (nbElementsToCreate > 5000) { + + if (profilesName.size() > 0) { + timeHelper.startCounting(ExecutionTimeHelper.STEP_6); + for (int j = 0; j < 100; j++) {// we do it 100 times + element.getAppliedStereotypes(); + } + timeHelper.stop(); + } + } + + final Resource res = element.eResource(); + Assert.isNotNull(res); + timeHelper.startCounting(ExecutionTimeHelper.STEP_7); + for (int k = 0; k < 100; k++) { + final EObject newModel = UMLFactory.eINSTANCE.createModel(); + RecordingCommand rc = new RecordingCommand(modelSet.getTransactionalEditingDomain()) { + + @Override + protected void doExecute() { + res.getContents().add(newModel); + + } + }; + modelSet.getTransactionalEditingDomain().getCommandStack().execute(rc); + } + timeHelper.stop(); + try { + modelSet.save(new NullProgressMonitor()); + // modelSet. + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + this.creationHelper.disposeAll(); + } + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java new file mode 100755 index 00000000..c2037deb --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PapyrusModelCreation.java @@ -0,0 +1,67 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.util.URI; +import org.eclipse.papyrus.infra.core.services.ServiceMultiException; + +/** + * @author VL222926 + * + */ +public class PapyrusModelCreation extends AbstractModelCreation { + + /** + * @see org.eclipse.papyrus.cdo.perfo.tests.impl.IPapyrusModelCreation#initPapyrusEnvironnement(java.lang.String, java.lang.String, List<String>) + * + * @param folderName + * @param modelName + * @throws Exception + */ + @Override + public void initPapyrusEnvironnement(String folderName, String modelName, List<String> profilesName) throws Exception { + createProject(folderName); + createModelSet(folderName, modelName, profilesName); + } + + private void createProject(final String projectName) throws CoreException { + IProgressMonitor progressMonitor = new NullProgressMonitor(); + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + IProject project = root.getProject(projectName); + project.create(progressMonitor); + project.open(progressMonitor); + } + + + + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractModelCreation#createBaseURI() + * + * @return + */ + @Override + protected URI createBaseURI() { + return null; + } + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java new file mode 100755 index 00000000..b4bff41a --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusQuickIndexCreationTest.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; + +/** + * @author VL222926 + * + */ +public class PurePapyrusQuickIndexCreationTest extends AbstractQuickIndexCreationTest { + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation() + * + * @return + */ + @Override + protected IPapyrusModelCreation createPapyrusModelCreation() { + return new PapyrusModelCreation(); + } + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType) + * + * @param nbClasses + * @return + */ + @Override + protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) { + final String id = elementType.getId(); + + ExecutionTimeHelper helper = new ExecutionTimeHelper("Papyrus Project: Create " + nbClasses + " " + id + " with quick Index.", ExecutionTimeHelper.Papyrus_TYPE, nbClasses, id); + merger.addTimeHelper(helper); + return helper; + } + + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java new file mode 100755 index 00000000..fd2a4209 --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/src/org/eclipse/papyrus/cdo/benchmarks/tests/PurePapyrusUniqueIndexCreationTest.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2018 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.cdo.benchmarks.tests; + +import org.eclipse.gmf.runtime.emf.type.core.IHintedType; + +/** + * @author VL222926 + * + */ +public class PurePapyrusUniqueIndexCreationTest extends AbstractUniqueIndexCreationTest { + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createPapyrusModelCreation() + * + * @return + */ + @Override + protected IPapyrusModelCreation createPapyrusModelCreation() { + return new PapyrusModelCreation(); + } + + /** + * @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractPerfTest#createTimeExecutionHelper(int, IHintedType) + * + * @param nbClasses + * @return + */ + @Override + protected ExecutionTimeHelper createTimeExecutionHelper(int nbClasses, IHintedType elementType) { + final String id = elementType.getId(); + + ExecutionTimeHelper helper = new ExecutionTimeHelper("Papyrus Project: Create " + nbClasses + " " + id + " with unique Index.", ExecutionTimeHelper.Papyrus_TYPE, nbClasses, id); + merger.addTimeHelper(helper); + return helper; + } + + + +} diff --git a/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx Binary files differnew file mode 100755 index 00000000..d06f542e --- /dev/null +++ b/plugins/cdo/benchmarks/org.eclipse.papyrus.cdo.benchmarks/~$Benchmarks results.xlsx diff --git a/plugins/cdo/benchmarks/pom.xml b/plugins/cdo/benchmarks/pom.xml new file mode 100755 index 00000000..7450eabf --- /dev/null +++ b/plugins/cdo/benchmarks/pom.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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 of this POM --> + <parent> + <groupId>org.eclipse.papyrus.cdo</groupId> + <artifactId>org.eclipse.papyrus.cdo.root</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + + <!-- Project POM (aggregator) --> + <artifactId>org.eclipse.papyrus.cdo-benchmarks</artifactId> + + <packaging>pom</packaging> + + <!-- Children modules to build --> + <modules> + <module>org.eclipse.papyrus.cdo.benchmarks</module> + </modules> + +</project>
\ No newline at end of file |