diff --git a/.classpath b/.classpath index 31223dc742592f137f39dc384bc12c47bdaecc00..fd307b509eafb5c6d0ae946fa9ebb6b00d730614 100644 --- a/.classpath +++ b/.classpath @@ -1,38 +1,38 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" output="target/classes" path="src/main/java"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" output="target/test-classes" path="src/test/java"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src/performancetest/java"/> - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="conf"/> - <classpathentry kind="output" path="target/classes"/> -</classpath> +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="src/performancetest/java"/> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="conf"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 849a31cb5ae9419e7fb2b164b4c61f6ff3e1838c..28f559fe7e7a625102643ff06297cba345e9adb1 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,387 +1,387 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled -org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW -org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,BETTER -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=165 -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=1 -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=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=do not 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=do not 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=165 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=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 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,BETTER +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=165 +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=1 +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=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=do not 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=do not 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=165 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=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/pom.xml b/pom.xml index 9a8dd26c13b5daeebfb814895e4e006e87e8b825..5e093b11c621281e892c8b1f7bbbb57ac773d67c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,364 +1,369 @@ -<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> - - <groupId>net.sourceforge.teetime-stages</groupId> - <artifactId>teetime-stages</artifactId> - <version>2.1-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>TeeTime-Stages</name> - <inceptionYear>2015</inceptionYear> - <url>http://teetime-framework.github.io</url> - <description>Kieker specific stages for the TeeTime framework</description> - - <licenses> - <license> - <name>Apache License, Version 2.0</name> - <url>http://christianwulf.github.io/teetime/LICENSE.txt</url> - </license> - </licenses> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <java.version>1.6</java.version> - </properties> - - - <repositories> - <repository> - <!-- for SNAPSHOT versions --> - <id>sonatype.oss.snapshots</id> - <url>https://oss.sonatype.org/content/repositories/snapshots/</url> - </repository> - </repositories> - - <distributionManagement> - <snapshotRepository> - <id>teetime-deployment</id> - <url>https://oss.sonatype.org/content/repositories/snapshots</url> - </snapshotRepository> - <repository> - <id>teetime-deployment</id> - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> - </repository> - </distributionManagement> - - <developers> - <developer> - <id>chw</id> - <name>Christian Wulf</name> - <email>chw@informatik.uni-kiel.de</email> - <organization>Christian-Albrechts-Universitaet zu Kiel</organization> - <organizationUrl>http://www.se.informatik.uni-kiel.de/en/team/christian-wulf</organizationUrl> - </developer> - <developer> - <id>ntd</id> - <name>Nelson Tavares de Sousa</name> - <email>ntd@informatik.uni-kiel.de</email> - <organization>Christian-Albrechts-Universitaet zu Kiel</organization> - <organizationUrl>http://www.se.uni-kiel.de/en</organizationUrl> - </developer> - </developers> - - <scm> - <connection>scm:git:https://build.se.informatik.uni-kiel.de/gitlab/chw/teetime.git</connection> - <developerConnection>scm:git:ssh://gitlab@build.se.informatik.uni-kiel.de:chw/teetime.git</developerConnection> - <url>https://build.se.informatik.uni-kiel.de/gitlab/chw/teetime/</url> - </scm> - - <dependencies> - <dependency> - <groupId>net.sourceforge.teetime</groupId> - <artifactId>teetime</artifactId> - <version>2.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>net.kieker-monitoring</groupId> - <artifactId>kieker</artifactId> - <version>1.11</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <version>1.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.7</version> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <version>1.1.2</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>18.0</version> - </dependency> - </dependencies> - - <build> - <plugins> - - <!-- we want JDK 1.6 source and binary compatibility --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - - <configuration> - <source>${java.version}</source> - <target>${java.version}</target> - </configuration> - </plugin> - - <!-- goals to check for plugin updates: versions:display-plugin-updates --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>versions-maven-plugin</artifactId> - <version>2.1</version> - </plugin> - - <!-- goals to build a jar with binaries: jar:jar, jar:test-jar --> - <!-- <plugin> --> - <!-- <groupId>org.apache.maven.plugins</groupId> --> - <!-- <artifactId>maven-jar-plugin</artifactId> --> - <!-- <version>2.5</version> --> - <!-- <executions> --> - <!-- <execution> --> - <!-- <goals> --> - <!-- <goal>test-jar</goal> --> - <!-- </goals> --> - <!-- </execution> --> - <!-- </executions> --> - <!-- </plugin> --> - - <!-- copies all dependencies as separate jars into the target folder --> - <!-- <plugin> --> - <!-- <groupId>org.apache.maven.plugins</groupId> --> - <!-- <artifactId>maven-dependency-plugin</artifactId> --> - <!-- <version>2.10</version> --> - <!-- <executions> --> - <!-- <execution> --> - <!-- <id>copy-dependencies</id> --> - <!-- <phase>package</phase> --> - <!-- <goals> --> - <!-- <goal>copy-dependencies</goal> --> - <!-- </goals> --> - <!-- </execution> --> - <!-- </executions> --> - <!-- </plugin> --> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.2.1</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.9.1</version> - <configuration> - <failOnError>false</failOnError> - </configuration> - <executions> - <execution> - <id>attach-javadocs</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.3</version> - <extensions>true</extensions> - <configuration> - <serverId>teetime-deployment</serverId> - <nexusUrl>https://oss.sonatype.org/</nexusUrl> - <autoReleaseAfterClose>false</autoReleaseAfterClose> - </configuration> - </plugin> - - <!-- Checkstyle --> - <!-- <plugin> --> - <!-- <groupId>org.apache.maven.plugins</groupId> --> - <!-- <artifactId>maven-checkstyle-plugin</artifactId> --> - <!-- <version>2.12</version> --> - <!-- <executions> --> - <!-- <execution> --> - <!-- <phase>test</phase> --> - <!-- <goals> --> - <!-- <goal>check</goal> --> - <!-- </goals> --> - <!-- <configuration> --> - <!-- <configLocation>${project.basedir}/conf/quality-config/cs-conf.xml</configLocation> --> - <!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> --> - <!-- <encoding>UTF-8</encoding> --> - <!-- <consoleOutput>true</consoleOutput> --> - <!-- <failsOnError>false</failsOnError> --> - <!-- <failOnViolation>false</failOnViolation> --> - <!-- <linkXRef>false</linkXRef> --> - <!-- </configuration> --> - <!-- </execution> --> - <!-- </executions> --> - <!-- </plugin> --> - - <!-- Findbugs --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>findbugs-maven-plugin</artifactId> - <version>3.0.0</version> - <configuration> - <effort>Max</effort> - <threshold>Low</threshold> - <includeTests>true</includeTests> - <failOnError>false</failOnError> - <excludeFilterFile>${project.basedir}/conf/quality-config/fb-filter.xml</excludeFilterFile> - </configuration> - <executions> - <execution> - <phase>test</phase> - <goals> - <goal>findbugs</goal> - </goals> - </execution> - </executions> - </plugin> - - <!-- PMD --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-pmd-plugin</artifactId> - <version>3.2</version> - <configuration> - <rulesets> - <ruleset>${project.basedir}/conf/quality-config/pmd-ruleset.xml</ruleset> - </rulesets> - <includeTests>true</includeTests> - <targetJdk>${java.version}</targetJdk> - <failOnError>false</failOnError> - </configuration> - <executions> - <execution> - <phase>test</phase> - <goals> - <goal>pmd</goal> - <goal>cpd</goal> - </goals> - </execution> - </executions> - </plugin> - - - <!-- Copyright Header --> - <plugin> - <groupId>com.mycila</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>2.7</version> - <configuration> - <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header> - <properties> - <owner>Christian Wulf, Nelson Tavares de Sousa</owner> - <email>http://christianwulf.github.io/teetime</email> - </properties> - <includes> - <include>**/*.java</include> - </includes> - </configuration> - <executions> - <execution> - <phase>test</phase> - <goals> - <goal>format</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - - - - <profiles> - <profile> - <id>performancetest</id> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.9.1</version> - <executions> - <execution> - <id>add-test-source</id> - <phase>generate-test-sources</phase> - <goals> - <goal>add-test-source</goal> - </goals> - <configuration> - <sources> - <source>src/performancetest/java</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - <activation> - </activation> - </profile> - <profile> - <id>signing</id> - <activation> - <property> - <name>sign-jars</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.5</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> +<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> + + <groupId>net.sourceforge.teetime-stages</groupId> + <artifactId>teetime-stages</artifactId> + <version>2.1-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>TeeTime-Stages</name> + <inceptionYear>2015</inceptionYear> + <url>http://teetime-framework.github.io</url> + <description>Kieker specific stages for the TeeTime framework</description> + + <licenses> + <license> + <name>Apache License, Version 2.0</name> + <url>http://christianwulf.github.io/teetime/LICENSE.txt</url> + </license> + </licenses> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <java.version>1.6</java.version> + </properties> + + + <repositories> + <repository> + <!-- for SNAPSHOT versions --> + <id>sonatype.oss.snapshots</id> + <url>https://oss.sonatype.org/content/repositories/snapshots/</url> + </repository> + </repositories> + + <distributionManagement> + <snapshotRepository> + <id>teetime-deployment</id> + <url>https://oss.sonatype.org/content/repositories/snapshots</url> + </snapshotRepository> + <repository> + <id>teetime-deployment</id> + <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> + </repository> + </distributionManagement> + + <developers> + <developer> + <id>chw</id> + <name>Christian Wulf</name> + <email>chw@informatik.uni-kiel.de</email> + <organization>Christian-Albrechts-Universitaet zu Kiel</organization> + <organizationUrl>http://www.se.informatik.uni-kiel.de/en/team/christian-wulf</organizationUrl> + </developer> + <developer> + <id>ntd</id> + <name>Nelson Tavares de Sousa</name> + <email>ntd@informatik.uni-kiel.de</email> + <organization>Christian-Albrechts-Universitaet zu Kiel</organization> + <organizationUrl>http://www.se.uni-kiel.de/en</organizationUrl> + </developer> + </developers> + + <scm> + <connection>scm:git:https://build.se.informatik.uni-kiel.de/gitlab/chw/teetime.git</connection> + <developerConnection>scm:git:ssh://gitlab@build.se.informatik.uni-kiel.de:chw/teetime.git</developerConnection> + <url>https://build.se.informatik.uni-kiel.de/gitlab/chw/teetime/</url> + </scm> + + <dependencies> + <dependency> + <groupId>net.sourceforge.teetime</groupId> + <artifactId>teetime</artifactId> + <version>2.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>net.kieker-monitoring</groupId> + <artifactId>kieker</artifactId> + <version>1.11</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.11</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-library</artifactId> + <version>1.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.7</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.1.2</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>18.0</version> + </dependency> + <dependency> + <groupId>com.tinkerpop.blueprints</groupId> + <artifactId>blueprints-core</artifactId> + <version>2.6.0</version> + </dependency> + </dependencies> + + <build> + <plugins> + + <!-- we want JDK 1.6 source and binary compatibility --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.1</version> + + <configuration> + <source>${java.version}</source> + <target>${java.version}</target> + </configuration> + </plugin> + + <!-- goals to check for plugin updates: versions:display-plugin-updates --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>versions-maven-plugin</artifactId> + <version>2.1</version> + </plugin> + + <!-- goals to build a jar with binaries: jar:jar, jar:test-jar --> + <!-- <plugin> --> + <!-- <groupId>org.apache.maven.plugins</groupId> --> + <!-- <artifactId>maven-jar-plugin</artifactId> --> + <!-- <version>2.5</version> --> + <!-- <executions> --> + <!-- <execution> --> + <!-- <goals> --> + <!-- <goal>test-jar</goal> --> + <!-- </goals> --> + <!-- </execution> --> + <!-- </executions> --> + <!-- </plugin> --> + + <!-- copies all dependencies as separate jars into the target folder --> + <!-- <plugin> --> + <!-- <groupId>org.apache.maven.plugins</groupId> --> + <!-- <artifactId>maven-dependency-plugin</artifactId> --> + <!-- <version>2.10</version> --> + <!-- <executions> --> + <!-- <execution> --> + <!-- <id>copy-dependencies</id> --> + <!-- <phase>package</phase> --> + <!-- <goals> --> + <!-- <goal>copy-dependencies</goal> --> + <!-- </goals> --> + <!-- </execution> --> + <!-- </executions> --> + <!-- </plugin> --> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.2.1</version> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.9.1</version> + <configuration> + <failOnError>false</failOnError> + </configuration> + <executions> + <execution> + <id>attach-javadocs</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <version>1.6.3</version> + <extensions>true</extensions> + <configuration> + <serverId>teetime-deployment</serverId> + <nexusUrl>https://oss.sonatype.org/</nexusUrl> + <autoReleaseAfterClose>false</autoReleaseAfterClose> + </configuration> + </plugin> + + <!-- Checkstyle --> + <!-- <plugin> --> + <!-- <groupId>org.apache.maven.plugins</groupId> --> + <!-- <artifactId>maven-checkstyle-plugin</artifactId> --> + <!-- <version>2.12</version> --> + <!-- <executions> --> + <!-- <execution> --> + <!-- <phase>test</phase> --> + <!-- <goals> --> + <!-- <goal>check</goal> --> + <!-- </goals> --> + <!-- <configuration> --> + <!-- <configLocation>${project.basedir}/conf/quality-config/cs-conf.xml</configLocation> --> + <!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> --> + <!-- <encoding>UTF-8</encoding> --> + <!-- <consoleOutput>true</consoleOutput> --> + <!-- <failsOnError>false</failsOnError> --> + <!-- <failOnViolation>false</failOnViolation> --> + <!-- <linkXRef>false</linkXRef> --> + <!-- </configuration> --> + <!-- </execution> --> + <!-- </executions> --> + <!-- </plugin> --> + + <!-- Findbugs --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>3.0.0</version> + <configuration> + <effort>Max</effort> + <threshold>Low</threshold> + <includeTests>true</includeTests> + <failOnError>false</failOnError> + <excludeFilterFile>${project.basedir}/conf/quality-config/fb-filter.xml</excludeFilterFile> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>findbugs</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- PMD --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>3.2</version> + <configuration> + <rulesets> + <ruleset>${project.basedir}/conf/quality-config/pmd-ruleset.xml</ruleset> + </rulesets> + <includeTests>true</includeTests> + <targetJdk>${java.version}</targetJdk> + <failOnError>false</failOnError> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>pmd</goal> + <goal>cpd</goal> + </goals> + </execution> + </executions> + </plugin> + + + <!-- Copyright Header --> + <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + <version>2.7</version> + <configuration> + <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header> + <properties> + <owner>Christian Wulf, Nelson Tavares de Sousa</owner> + <email>http://christianwulf.github.io/teetime</email> + </properties> + <includes> + <include>**/*.java</include> + </includes> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>format</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + + + <profiles> + <profile> + <id>performancetest</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.9.1</version> + <executions> + <execution> + <id>add-test-source</id> + <phase>generate-test-sources</phase> + <goals> + <goal>add-test-source</goal> + </goals> + <configuration> + <sources> + <source>src/performancetest/java</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <activation> + </activation> + </profile> + <profile> + <id>signing</id> + <activation> + <property> + <name>sign-jars</name> + <value>true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-gpg-plugin</artifactId> + <version>1.5</version> + <executions> + <execution> + <id>sign-artifacts</id> + <phase>verify</phase> + <goals> + <goal>sign</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/src/main/java/kieker/analysis/TraceAnalysis.java b/src/main/java/kieker/analysis/TraceAnalysis.java new file mode 100644 index 0000000000000000000000000000000000000000..7c8bc25bd8bcd4d9c2d124707e1d25e795ef5e57 --- /dev/null +++ b/src/main/java/kieker/analysis/TraceAnalysis.java @@ -0,0 +1,56 @@ +/** + * + */ +package kieker.analysis; + +import java.io.File; + +import teetime.framework.Execution; + +/** + * + */ +public final class TraceAnalysis { + + public static void main(final String[] args) { + + // TODO Temp + File importDirectory = new File("example/event monitoring log"); + + final TraceAnalysisConfiguration traceAnalysisConfiguration = new TraceAnalysisConfiguration(importDirectory); + final Execution<TraceAnalysisConfiguration> analysis = new Execution<>(traceAnalysisConfiguration); + analysis.executeBlocking(); + + // ******* TEMP + /* + * for (OperationCall operationCall : traceAnalysisConfiguration.getOperationCalls()) { + * System.out.println(operationCall.getOperation() + " " + operationCall.getDuration()); + * for (OperationCall childrenOperationCall : operationCall.getChildren()) { + * System.out.println("+-->" + childrenOperationCall.getOperation() + " " + childrenOperationCall.getDuration()); + * for (OperationCall cd2OperationCall : childrenOperationCall.getChildren()) { + * System.out.println("..+-->" + cd2OperationCall.getOperation() + " " + cd2OperationCall.getDuration()); + * } + * } + * } + * // ************* + * + * try (Writer writer = new BufferedWriter(new OutputStreamWriter( + * new FileOutputStream("example/event monitoring log/output/call-graph.dot"), "utf-8"))) { + * writer.write("something"); + * writer.write("\n"); + * writer.write("second line"); + * } catch (UnsupportedEncodingException e1) { + * // TODO Auto-generated catch block + * e1.printStackTrace(); + * } catch (FileNotFoundException e1) { + * // TODO Auto-generated catch block + * e1.printStackTrace(); + * } catch (IOException e1) { + * // TODO Auto-generated catch block + * e1.printStackTrace(); + * } + */ + + } + +} diff --git a/src/main/java/kieker/analysis/TraceAnalysisConfiguration.java b/src/main/java/kieker/analysis/TraceAnalysisConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..72d8f9a658f56d318d11e22fcdbaecc119759950 --- /dev/null +++ b/src/main/java/kieker/analysis/TraceAnalysisConfiguration.java @@ -0,0 +1,110 @@ +/** + * + */ +package kieker.analysis; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import kieker.analysis.stage.tracediagnosis.AllowedRecordsFilter; +import kieker.analysis.stage.tracediagnosis.BeginEndOfMonitoringDetector; +import kieker.analysis.stage.tracediagnosis.OperationCallHandlerComposite; +import kieker.analysis.stage.tracediagnosis.ReadingComposite; +import kieker.analysis.stage.tracediagnosis.TraceAggregationComposite; +import kieker.analysis.stage.tracediagnosis.TraceReconstructionComposite; +import kieker.analysis.traceanalysisdomain.AggregatedOperationCall; +import kieker.analysis.traceanalysisdomain.AggregatedTrace; +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; +import kieker.common.record.IMonitoringRecord; +import kieker.common.record.misc.KiekerMetadataRecord; + +import teetime.framework.Configuration; +import teetime.stage.CollectorSink; +import teetime.stage.MultipleInstanceOfFilter; +import teetime.stage.basic.distributor.Distributor; +import teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy; + +/** + * + */ + +public class TraceAnalysisConfiguration extends Configuration { + + private final List<Trace> traces = new ArrayList<>(1000); + private final List<OperationCall> operationCalls = new ArrayList<>(1000); + private final List<AggregatedOperationCall> aggregatedOperationCalls = new ArrayList<>(1000); + private final List<AggregatedTrace> aggregatedTraces = new ArrayList<>(1000); + + private final List<KiekerMetadataRecord> metadataRecords = new ArrayList<>(1000); + private final TraceReconstructionComposite reconstruction; + private final BeginEndOfMonitoringDetector beginEndOfMonitoringDetector; + private final AllowedRecordsFilter allowedRecordsFilter; + + public TraceAnalysisConfiguration(final File importDirectory) { + // Create the stages + final ReadingComposite reader = new ReadingComposite(importDirectory); + final MultipleInstanceOfFilter<IMonitoringRecord> typeFilter = new MultipleInstanceOfFilter<>(); + final Distributor<Trace> distributor = new Distributor<>(new CopyByReferenceStrategy()); + final TraceAggregationComposite aggregation = new TraceAggregationComposite(this.aggregatedTraces); + final CollectorSink<KiekerMetadataRecord> metadataCollector = new CollectorSink<>(this.metadataRecords); + final OperationCallHandlerComposite operationCallHandler = new OperationCallHandlerComposite(this.operationCalls, this.aggregatedOperationCalls); + + this.allowedRecordsFilter = new AllowedRecordsFilter(); + this.beginEndOfMonitoringDetector = new BeginEndOfMonitoringDetector(); + this.reconstruction = new TraceReconstructionComposite(this.traces, true); // TODO Temp. + // this.reconstruction = new TraceReconstructionComposite(this.traces, PropertiesModel.getInstance().isAdditionalLogChecks()); + + // Connect the stages + super.connectPorts(reader.getOutputPort(), allowedRecordsFilter.getInputPort()); + super.connectPorts(allowedRecordsFilter.getOutputPort(), typeFilter.getInputPort()); + super.connectPorts(typeFilter.getOutputPortForType(IMonitoringRecord.class), this.beginEndOfMonitoringDetector.getInputPort()); + super.connectPorts(this.beginEndOfMonitoringDetector.getOutputPort(), this.reconstruction.getInputPort()); + super.connectPorts(this.reconstruction.getOutputPort(), distributor.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), operationCallHandler.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), aggregation.getInputPort()); + super.connectPorts(typeFilter.getOutputPortForType(KiekerMetadataRecord.class), metadataCollector.getInputPort()); + } + + public long getBeginTimestamp() { + return this.beginEndOfMonitoringDetector.getBeginTimestamp(); + } + + public long getEndTimestamp() { + return this.beginEndOfMonitoringDetector.getEndTimestamp(); + } + + public int countIncompleteTraces() { + return this.reconstruction.countIncompleteTraces(); + } + + public int countDanglingEvents() { + return this.reconstruction.countDanglingRecords(); + } + + public int countIgnoredRecords() { + return this.allowedRecordsFilter.getIgnoredRecords(); + } + + public List<Trace> getTracesList() { + return this.traces; + } + + public List<AggregatedTrace> getAggregatedTraces() { + return this.aggregatedTraces; + } + + public List<KiekerMetadataRecord> getMetadataRecords() { + return this.metadataRecords; + } + + public List<OperationCall> getOperationCalls() { + return this.operationCalls; + } + + public List<AggregatedOperationCall> getAggregatedOperationCalls() { + return this.aggregatedOperationCalls; + } + +} diff --git a/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriter.java b/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriter.java new file mode 100644 index 0000000000000000000000000000000000000000..a12c98342c5ce63e9a5df2fe57baca219fc15994 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriter.java @@ -0,0 +1,85 @@ +package kieker.analysis.stage.graphoutput; + +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; + +import com.tinkerpop.blueprints.Direction; +import com.tinkerpop.blueprints.Edge; +import com.tinkerpop.blueprints.Graph; +import com.tinkerpop.blueprints.Vertex; + +import kieker.tools.traceAnalysis.filter.visualization.util.dot.DotFactory; + +import teetime.framework.AbstractConsumerStage; + +public class DotGraphWriter extends AbstractConsumerStage<Graph> { + + private final String outputDir; + + public DotGraphWriter(final String outputDir) { + this.outputDir = outputDir; + } + + @Override + protected void execute(final Graph graph) { + String dotGraph = createDotGraph(graph); + + try { + writeDotGraphFile(dotGraph); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private String createDotGraph(final Graph graph) { + + StringBuilder dotGraph = new StringBuilder(); + + dotGraph.append(createDotGraphHead()); + for (Vertex vertex : graph.getVertices()) { + dotGraph.append(createDotGraphVertex(vertex)); + } + for (Edge edge : graph.getEdges()) { + dotGraph.append(createDotGraphEdge(edge)); + } + dotGraph.append(createDotGraphFoot()); + + return dotGraph.toString(); + } + + private String createDotGraphHead() { + return "digraph g {"; + } + + private String createDotGraphFoot() { + return "}"; + } + + // TODO Using DotFactory? + private String createDotGraphVertex(final Vertex vertex) { + return DotFactory.createNode("", String.valueOf(vertex.getId()), vertex.getProperty("label"), + null, null, null, null, null, 0, null, null, null).toString(); + } + + // TODO Using DotFactory? + private String createDotGraphEdge(final Edge edge) { + String source = edge.getVertex(Direction.OUT).getId().toString(); + String target = edge.getVertex(Direction.IN).getId().toString(); + return DotFactory.createConnection("", source, target, 0, 0); + } + + private void writeDotGraphFile(final String dotGraph) throws IOException { + + OutputStream outputStream = new FileOutputStream(outputDir + "/traces.dot"); + + Writer writer = new BufferedWriter(new OutputStreamWriter(outputStream, "utf-8")); + writer.write(dotGraph); + writer.close(); + + } +} diff --git a/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriterOld.java b/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriterOld.java new file mode 100644 index 0000000000000000000000000000000000000000..b05226797a372422027969931059e1d97f5a7194 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/graphoutput/DotGraphWriterOld.java @@ -0,0 +1,53 @@ +package kieker.analysis.stage.graphoutput; + +import kieker.analysis.traceanalysisdomain.AbstractOperationCall; +import kieker.analysis.traceanalysisdomain.AbstractTrace; +import kieker.tools.traceAnalysis.filter.visualization.util.dot.DotFactory; + +import teetime.framework.AbstractConsumerStage; + +//TODO: really necessary to have 2 type parameters? +public class DotGraphWriterOld<T extends AbstractTrace<C>, C extends AbstractOperationCall<C>> extends AbstractConsumerStage<T> { + + @Override + protected void execute(final T trace) { + String graph = handleOperationCallsRecurive(trace.getRootOperationCall(), null, 0).toString(); + System.out.println("digraph graphname {"); + System.out.println(graph); + System.out.println("}"); + } + + private StringBuilder handleOperationCallsRecurive(final C operationCall, final C parentOperationCall, final int depth) { + + StringBuilder graph = new StringBuilder(handleOperationCall(operationCall, parentOperationCall, depth)); + + for (C childOperationCall : operationCall.getChildren()) { + graph.append(handleOperationCallsRecurive(childOperationCall, operationCall, depth + 1)); + } + + return graph; + } + + // TODO Maybe change to protected when class is abstract + private StringBuilder handleOperationCall(final C operationCall, final C parentOperationCall, final int depth) { + + StringBuilder output = new StringBuilder(); + + output.append(createDotNode(operationCall.hashCode(), operationCall.getOperation())); + if (parentOperationCall != null) { + output.append(createDotConnection(parentOperationCall.hashCode(), operationCall.hashCode())); + } + + return output; + } + + private StringBuilder createDotNode(final int id, final String label) { + return DotFactory.createNode("", String.valueOf(id), label, null, null, null, null, null, 0, + null, null, null); + } + + private StringBuilder createDotConnection(final int from, final int to) { + return new StringBuilder(DotFactory.createConnection("", String.valueOf(from), String.valueOf(to), 0, 0)); + } + +} diff --git a/src/main/java/kieker/analysis/stage/graphoutput/GraphBuilder.java b/src/main/java/kieker/analysis/stage/graphoutput/GraphBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..dac7685dc5bca8f1b84846197d1ed3dd61ecf084 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/graphoutput/GraphBuilder.java @@ -0,0 +1,47 @@ +package kieker.analysis.stage.graphoutput; + +import com.tinkerpop.blueprints.Graph; +import com.tinkerpop.blueprints.Vertex; +import com.tinkerpop.blueprints.impls.tg.TinkerGraph; + +import kieker.analysis.traceanalysisdomain.AbstractOperationCall; +import kieker.analysis.traceanalysisdomain.AbstractTrace; + +import teetime.stage.basic.AbstractTransformation; + +//TODO: really necessary to have 2 type parameters? +public class GraphBuilder<T extends AbstractTrace<C>, C extends AbstractOperationCall<C>> extends AbstractTransformation<T, Graph> { + + @Override + protected void execute(final T trace) { + + Graph graph = new TinkerGraph(); + + transformOperationCallsRecurive(graph, trace.getRootOperationCall(), null); + + this.getOutputPort().send(graph); + } + + private void transformOperationCallsRecurive(final Graph graph, final C operationCall, final Vertex parentVertex) { + + Vertex vertex = transformOperationCall(graph, operationCall, parentVertex); + + for (C childOperationCall : operationCall.getChildren()) { + transformOperationCallsRecurive(graph, childOperationCall, vertex); + } + } + + private Vertex transformOperationCall(final Graph graph, final C operationCall, final Vertex parentVertex) { + + Vertex vertex = graph.addVertex(operationCall.hashCode()); + // TODO exact properties + vertex.setProperty("label", operationCall.getOperation()); + + if (parentVertex != null) { + graph.addEdge(null, parentVertex, vertex, ""); + } + + return vertex; + } + +} diff --git a/src/main/java/kieker/analysis/stage/graphoutput/GraphMLWriter.java b/src/main/java/kieker/analysis/stage/graphoutput/GraphMLWriter.java new file mode 100644 index 0000000000000000000000000000000000000000..cf286f7ffe1e2a48eeac7d2293424d71cf449197 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/graphoutput/GraphMLWriter.java @@ -0,0 +1,34 @@ +package kieker.analysis.stage.graphoutput; + +import java.io.IOException; + +import com.tinkerpop.blueprints.Graph; + +import teetime.framework.AbstractConsumerStage; + +public class GraphMLWriter extends AbstractConsumerStage<Graph> { + + private final String outputDir; + + public GraphMLWriter(final String outputDir) { + this.outputDir = outputDir; + } + + @Override + protected void execute(final Graph graph) { + + String outputFile = outputDir + "/traces.xml"; + + com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter writer = new com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter(graph); + writer.setNormalize(true); + + try { + writer.outputGraph(outputFile); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/AggregatedTraceStatisticsDecorator.java b/src/main/java/kieker/analysis/stage/tracediagnosis/AggregatedTraceStatisticsDecorator.java new file mode 100644 index 0000000000000000000000000000000000000000..b54290c18c6c3c233aeef4d5de0df38dc552a999 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/AggregatedTraceStatisticsDecorator.java @@ -0,0 +1,120 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.ArrayList; +import java.util.List; + +import kieker.analysis.traceanalysisdomain.AggregatedOperationCall; +import kieker.analysis.traceanalysisdomain.AggregatedTrace; +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; +import kieker.analysis.traceanalysisutil.Statistics; +import kieker.analysis.traceanalysisutil.StatisticsUtility; + +import teetime.stage.basic.AbstractTransformation; + +/** + * This class is a {@code TeeTime} stage adding statistics (via the corresponding setters) to instances of {@link AggregatedTrace}. The traces are forwarded to the + * output port. + * + * @author Nils Christian Ehmke + */ +public final class AggregatedTraceStatisticsDecorator extends AbstractTransformation<AggregatedTrace, AggregatedTrace> { + + @Override + public void execute(final AggregatedTrace trace) { + AggregatedTraceStatisticsDecorator.addNumberOfCalls(trace.getRootOperationCall(), trace.getTraces().size()); + AggregatedTraceStatisticsDecorator.addDurationStatistics(trace); + + // The references are no longer needed + trace.getTraces().clear(); + + super.getOutputPort().send(trace); + } + + private static void addNumberOfCalls(final AggregatedOperationCall call, final int calls) { + call.setCalls(calls); + + for (final AggregatedOperationCall child : call.getChildren()) { + AggregatedTraceStatisticsDecorator.addNumberOfCalls(child, calls); + } + } + + private static void addDurationStatistics(final AggregatedTrace trace) { + final TraceDurationVisitor traceDurationVisitor = new TraceDurationVisitor(); + + for (final Trace t : trace.getTraces()) { + traceDurationVisitor.visit(t); + } + + traceDurationVisitor.addDurationStatistics(trace); + } + + /** + * @author Nils Christian Ehmke + */ + private static final class TraceDurationVisitor { + + private final List<List<Long>> durationsPerEdge = new ArrayList<>(); + private int edgeIndex; + + public void visit(final Trace trace) { + this.edgeIndex = -1; + this.visit(trace.getRootOperationCall()); + } + + private void visit(final OperationCall rootOperationCall) { + this.edgeIndex++; + if (this.durationsPerEdge.size() <= this.edgeIndex) { + this.durationsPerEdge.add(new ArrayList<Long>()); + } + + final List<Long> durationsOfCurrentEdge = this.durationsPerEdge.get(this.edgeIndex); + + durationsOfCurrentEdge.add(rootOperationCall.getDuration()); + + for (final OperationCall child : rootOperationCall.getChildren()) { + this.visit(child); + } + } + + public void addDurationStatistics(final AggregatedTrace trace) { + this.edgeIndex = -1; + this.addDurationStatistics(trace.getRootOperationCall()); + } + + private void addDurationStatistics(final AggregatedOperationCall rootOperationCall) { + this.edgeIndex++; + + final List<Long> durationsOfCurrentEdge = this.durationsPerEdge.get(this.edgeIndex); + + final Statistics statistics = StatisticsUtility.calculateStatistics(durationsOfCurrentEdge); + rootOperationCall.setMinDuration(statistics.getMinDuration()); + rootOperationCall.setMaxDuration(statistics.getMaxDuration()); + rootOperationCall.setMeanDuration(statistics.getMeanDuration()); + rootOperationCall.setTotalDuration(statistics.getTotalDuration()); + rootOperationCall.setMedianDuration(statistics.getMedianDuration()); + + for (final AggregatedOperationCall child : rootOperationCall.getChildren()) { + this.addDurationStatistics(child); + } + } + + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/AllowedRecordsFilter.java b/src/main/java/kieker/analysis/stage/tracediagnosis/AllowedRecordsFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..113dc194503e8ff842dd091f461ac4929fcdd700 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/AllowedRecordsFilter.java @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import kieker.common.record.IMonitoringRecord; +import kieker.common.record.controlflow.OperationExecutionRecord; +import kieker.common.record.flow.trace.TraceMetadata; +import kieker.common.record.flow.trace.operation.AfterOperationEvent; +import kieker.common.record.flow.trace.operation.BeforeOperationEvent; +import kieker.common.record.misc.KiekerMetadataRecord; +import teetime.stage.basic.AbstractTransformation; + +/** + * @author Nils Christian Ehmke + */ +public final class AllowedRecordsFilter extends AbstractTransformation<IMonitoringRecord, IMonitoringRecord> { + + private int ignoredRecords; + + @Override + protected void execute(final IMonitoringRecord element) { + if (element instanceof TraceMetadata || element instanceof BeforeOperationEvent || element instanceof AfterOperationEvent || element instanceof KiekerMetadataRecord || element instanceof OperationExecutionRecord) { + super.getOutputPort().send(element); + } else { + ignoredRecords++; + } + } + + public int getIgnoredRecords() { + return ignoredRecords; + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/BeginEndOfMonitoringDetector.java b/src/main/java/kieker/analysis/stage/tracediagnosis/BeginEndOfMonitoringDetector.java new file mode 100644 index 0000000000000000000000000000000000000000..4c779ef312b5c1e78ddf4aa5aa7a05ff600a0e3a --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/BeginEndOfMonitoringDetector.java @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import kieker.common.record.IMonitoringRecord; + +import teetime.stage.basic.AbstractTransformation; + +/** + * @author Nils Christian Ehmke + */ +public final class BeginEndOfMonitoringDetector extends AbstractTransformation<IMonitoringRecord, IMonitoringRecord> { + + private long beginTimestamp = Long.MAX_VALUE; + private long endTimestamp = 0; + + @Override + protected void execute(final IMonitoringRecord record) { + final long loggingTimestamp = record.getLoggingTimestamp(); + + if (loggingTimestamp < this.beginTimestamp) { + this.beginTimestamp = loggingTimestamp; + } + if (loggingTimestamp > this.endTimestamp) { + this.endTimestamp = loggingTimestamp; + } + + super.getOutputPort().send(record); + } + + public long getBeginTimestamp() { + return this.beginTimestamp; + } + + public long getEndTimestamp() { + return this.endTimestamp; + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/Filter.java b/src/main/java/kieker/analysis/stage/tracediagnosis/Filter.java new file mode 100644 index 0000000000000000000000000000000000000000..a3096e66b9729cfeb5d1a9cdc6e2b624482b1a38 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/Filter.java @@ -0,0 +1,46 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.function.Predicate; + +import teetime.stage.basic.AbstractTransformation; + +/** + * This stage filters incoming objects and forwards only those which meet the given predicate. + * + * @author Nils Christian Ehmke + * + * @param <T> + * The precise type of the incoming and outgoing object. + */ +public final class Filter<T> extends AbstractTransformation<T, T> { + + private final Predicate<T> predicate; + + public Filter(final Predicate<T> predicate) { + this.predicate = predicate; + } + + @Override + protected void execute(final T element) { + if (this.predicate.test(element)) { + super.getOutputPort().send(element); + } + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/LegacyTraceReconstructor.java b/src/main/java/kieker/analysis/stage/tracediagnosis/LegacyTraceReconstructor.java new file mode 100644 index 0000000000000000000000000000000000000000..3eff97176cca620a2ebe744a21c742ee2d4cc15a --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/LegacyTraceReconstructor.java @@ -0,0 +1,147 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; +import kieker.common.record.controlflow.OperationExecutionRecord; + +import teetime.stage.basic.AbstractTransformation; + +/** + * Reconstruct traces based on the incoming instances of {@code OperationExecutionRecord}. + * + * @author Nils Christian Ehmke + */ +final class LegacyTraceReconstructor extends AbstractTransformation<OperationExecutionRecord, Trace> { + + private final Map<Long, TraceBuffer> traceBuffers = new HashMap<>(); + + public int countIncompleteTraces() { + return this.traceBuffers.size(); + } + + public int countDanglingRecords() { + return 0; + } + + @Override + protected void execute(final OperationExecutionRecord input) { + this.handleOperationExecutionRecord(input); + } + + private void handleOperationExecutionRecord(final OperationExecutionRecord input) { + final long traceID = input.getTraceId(); + if (!this.traceBuffers.containsKey(traceID)) { + this.traceBuffers.put(traceID, new TraceBuffer(traceID)); + } + final TraceBuffer traceBuffer = this.traceBuffers.get(traceID); + + traceBuffer.handleEvent(input); + if (traceBuffer.isTraceComplete()) { + final Trace trace = traceBuffer.reconstructTrace(); + this.traceBuffers.remove(traceID); + super.getOutputPort().send(trace); + } + } + + /** + * @author Nils Christian Ehmke + */ + private static final class TraceBuffer { + + private final List<OperationExecutionRecord> records = new ArrayList<>(); + private final long traceID; + private boolean traceComplete = false; + + public TraceBuffer(final long traceID) { + this.traceID = traceID; + } + + public void handleEvent(final OperationExecutionRecord record) { + this.records.add(record); + + if ((record.getEoi() == 0) && (record.getEss() == 0)) { + this.traceComplete = true; + } + } + + public Trace reconstructTrace() { + Collections.sort(this.records, new EOIComparator()); + + OperationCall root = null; + OperationCall header = null; + int ess = 0; + for (final OperationExecutionRecord record : this.records) { + final OperationCall newCall = new OperationCall(record.getHostname(), this.extractComponent(record.getOperationSignature()), + record.getOperationSignature(), + this.traceID, record.getLoggingTimestamp()); + newCall.setDuration(record.getTout() - record.getTin()); + + // There can be "jumps" in the ess, as the operation execution records do not log the return jumps of methods. Therefore multiple of these jumps can + // be hidden. + int currentEss = record.getEss(); + while ((currentEss <= ess) && (ess != 0)) { + header = header.getParent(); + currentEss++; + } + + if (root == null) { + root = newCall; + } else { + header.addChild(newCall); + } + header = newCall; + ess = record.getEss(); + } + + return new Trace(root, this.traceID); + } + + private String extractComponent(final String operationSignature) { + return operationSignature.replaceFirst("\\.\\w*\\(.*", ""); + } + + public boolean isTraceComplete() { + return this.traceComplete; + } + + /** + * @author Nils Christian Ehmke + */ + private static final class EOIComparator implements Comparator<OperationExecutionRecord>, Serializable { + + private static final long serialVersionUID = 1L; + + @Override + public int compare(final OperationExecutionRecord o1, final OperationExecutionRecord o2) { + return Long.compare(o1.getEoi(), o2.getEoi()); + } + + } + + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java new file mode 100644 index 0000000000000000000000000000000000000000..218070b7e04dc9a37e53f73f0a90b40c7b6d7fac --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallAggregator.java @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import kieker.analysis.traceanalysisdomain.AggregatedOperationCall; +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisutil.Statistics; +import kieker.analysis.traceanalysisutil.StatisticsUtility; + +import teetime.stage.basic.AbstractTransformation; + +/** + * @author Nils Christian Ehmke + */ +public final class OperationCallAggregator extends AbstractTransformation<OperationCall, AggregatedOperationCall> { + + private final Map<String, List<OperationCall>> aggregationMap = new HashMap<>(); + + @Override + protected void execute(final OperationCall call) { + final String key = call.getContainer() + "," + call.getComponent() + "," + call.getOperation() + ", " + call.getFailedCause(); + + if (!this.aggregationMap.containsKey(key)) { + final List<OperationCall> aggregationList = new ArrayList<>(); + this.aggregationMap.put(key, aggregationList); + } + this.aggregationMap.get(key).add(call); + } + + @Override + public void onTerminating() throws Exception { + for (final List<OperationCall> aggregationList : this.aggregationMap.values()) { + final List<Long> durations = this.extractDurations(aggregationList); + final Statistics statistics = StatisticsUtility.calculateStatistics(durations); + super.getOutputPort().send( + new AggregatedOperationCall(aggregationList.get(0).getContainer(), aggregationList.get(0).getComponent(), aggregationList.get(0).getOperation(), + aggregationList.get(0).getFailedCause(), statistics.getTotalDuration(), statistics.getMedianDuration(), statistics.getMinDuration(), + statistics + .getMaxDuration(), + statistics.getMeanDuration(), aggregationList.size())); + } + + super.onTerminating(); + } + + private List<Long> extractDurations(final List<OperationCall> callList) { + final List<Long> result = new ArrayList<>(); + + for (final OperationCall call : callList) { + result.add(call.getDuration()); + } + + return result; + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallExtractor.java b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallExtractor.java new file mode 100644 index 0000000000000000000000000000000000000000..edf4d8cb28edcb1099ffc08a75ca485f1496bdf1 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallExtractor.java @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; + +import teetime.stage.basic.AbstractTransformation; + +/** + * @author Nils Christian Ehmke + */ +public final class OperationCallExtractor extends AbstractTransformation<Trace, OperationCall> { + + @Override + protected void execute(final Trace element) { + this.sendAllCalls(element.getRootOperationCall()); + } + + private void sendAllCalls(final OperationCall call) { + super.getOutputPort().send(call); + + call.getChildren().forEach(child -> this.sendAllCalls(child)); + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallHandlerComposite.java b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallHandlerComposite.java new file mode 100644 index 0000000000000000000000000000000000000000..2d24d489dc6150dfdda0bb387f4419addd112e85 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/OperationCallHandlerComposite.java @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.List; + +import kieker.analysis.traceanalysisdomain.AggregatedOperationCall; +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; + +import teetime.framework.AbstractCompositeStage; +import teetime.framework.InputPort; +import teetime.stage.CollectorSink; +import teetime.stage.basic.distributor.Distributor; +import teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy; + +/** + * @author Nils Christian Ehmke + */ +public final class OperationCallHandlerComposite extends AbstractCompositeStage { + + private final InputPort<Trace> inputPort; + private final OperationCallExtractor operationCallExtractor; + private final CollectorSink<OperationCall> callCollector; + private final CollectorSink<AggregatedOperationCall> aggCallCollector; + + public OperationCallHandlerComposite(final List<OperationCall> operationCalls, final List<AggregatedOperationCall> aggOperationCalls) { + this.operationCallExtractor = new OperationCallExtractor(); + this.callCollector = new CollectorSink<>(operationCalls); + final Distributor<OperationCall> distributor = new Distributor<>(new CopyByReferenceStrategy()); + final OperationCallAggregator callAggregator = new OperationCallAggregator(); + this.aggCallCollector = new CollectorSink<>(aggOperationCalls); + + this.inputPort = this.operationCallExtractor.getInputPort(); + + super.connectPorts(this.operationCallExtractor.getOutputPort(), distributor.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), this.callCollector.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), callAggregator.getInputPort()); + super.connectPorts(callAggregator.getOutputPort(), this.aggCallCollector.getInputPort()); + } + + public InputPort<Trace> getInputPort() { + return this.inputPort; + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/ReadingComposite.java b/src/main/java/kieker/analysis/stage/tracediagnosis/ReadingComposite.java new file mode 100644 index 0000000000000000000000000000000000000000..6b48ecce835089b0659d3fa182bdbf6a897627cc --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/ReadingComposite.java @@ -0,0 +1,50 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.io.File; + +import kieker.common.record.IMonitoringRecord; + +import teetime.framework.AbstractCompositeStage; +import teetime.framework.OutputPort; +import teetime.stage.InitialElementProducer; +import teetime.stage.className.ClassNameRegistryRepository; +import teetime.stage.io.filesystem.Dir2RecordsFilter; + +/** + * This is a composite stage which deserializes monitoring records from a specific directory and forwards them to the output port. + * + * @author Nils Christian Ehmke + */ +public final class ReadingComposite extends AbstractCompositeStage { + + private final InitialElementProducer<File> producer; + private final Dir2RecordsFilter reader; + + public ReadingComposite(final File importDirectory) { + this.producer = new InitialElementProducer<>(importDirectory); + this.reader = new Dir2RecordsFilter(new ClassNameRegistryRepository()); + + super.connectPorts(this.producer.getOutputPort(), this.reader.getInputPort()); + } + + public OutputPort<IMonitoringRecord> getOutputPort() { + return this.reader.getOutputPort(); + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregationComposite.java b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregationComposite.java new file mode 100644 index 0000000000000000000000000000000000000000..c8f354799d20b942ebefc5af92336bdf1b7892e3 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregationComposite.java @@ -0,0 +1,80 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.List; + +import com.tinkerpop.blueprints.Graph; + +import kieker.analysis.stage.graphoutput.DotGraphWriter; +import kieker.analysis.stage.graphoutput.GraphBuilder; +import kieker.analysis.stage.graphoutput.GraphMLWriter; +import kieker.analysis.traceanalysisdomain.AggregatedOperationCall; +import kieker.analysis.traceanalysisdomain.AggregatedTrace; +import kieker.analysis.traceanalysisdomain.Trace; + +import teetime.framework.AbstractCompositeStage; +import teetime.framework.InputPort; +import teetime.stage.CollectorSink; +import teetime.stage.basic.distributor.Distributor; +import teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy; + +/** + * This is a composite {@code TeeTime} stage which aggregates incoming traces, adds statistical data and stores the aggregated traces. + * + * @author Nils Christian Ehmke + */ +public final class TraceAggregationComposite extends AbstractCompositeStage { + + private final TraceAggregator aggregator; + private final CollectorSink<AggregatedTrace> tracesCollector; + private final AggregatedTraceStatisticsDecorator statisticsDecorator; + + public TraceAggregationComposite(final List<AggregatedTrace> traces) { + this.aggregator = new TraceAggregator(); + this.statisticsDecorator = new AggregatedTraceStatisticsDecorator(); + this.tracesCollector = new CollectorSink<>(traces); + + super.connectPorts(this.aggregator.getOutputPort(), this.statisticsDecorator.getInputPort()); + // super.connectPorts(this.statisticsDecorator.getOutputPort(), this.tracesCollector.getInputPort()); + + // TODO New from Sören + + String graphFilesOutputDir = "example/event monitoring log/output"; // TODO Temp hard coded + + final Distributor<AggregatedTrace> distributor = new Distributor<>(new CopyByReferenceStrategy()); + // DotGraphWriterOld<AggregatedTrace, AggregatedOperationCall> callDotGraphWriter = new DotGraphWriterOld<>(); TODO Remove + GraphBuilder<AggregatedTrace, AggregatedOperationCall> aggregatedTraceGraphBuilder = new GraphBuilder<>(); + final Distributor<Graph> graphDistributor = new Distributor<>(new CopyByReferenceStrategy()); + GraphMLWriter graphMLWriter = new GraphMLWriter(graphFilesOutputDir); + DotGraphWriter dotGraphWriter = new DotGraphWriter(graphFilesOutputDir); + + super.connectPorts(this.statisticsDecorator.getOutputPort(), distributor.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), this.tracesCollector.getInputPort()); + // super.connectPorts(distributor.getNewOutputPort(), callDotGraphWriter.getInputPort()); TODO Remove + super.connectPorts(distributor.getNewOutputPort(), aggregatedTraceGraphBuilder.getInputPort()); + super.connectPorts(aggregatedTraceGraphBuilder.getOutputPort(), graphDistributor.getInputPort()); + super.connectPorts(graphDistributor.getNewOutputPort(), graphMLWriter.getInputPort()); + super.connectPorts(graphDistributor.getNewOutputPort(), dotGraphWriter.getInputPort()); + + } + + public InputPort<Trace> getInputPort() { + return this.aggregator.getInputPort(); + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregator.java b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregator.java new file mode 100644 index 0000000000000000000000000000000000000000..3954532de0d3dfff9283c74706f48ab2e3b15cb2 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceAggregator.java @@ -0,0 +1,78 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import kieker.analysis.traceanalysisdomain.AggregatedTrace; +import kieker.analysis.traceanalysisdomain.Trace; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import teetime.stage.basic.AbstractTransformation; + +/** + * This stage aggregates incoming traces into trace equivalence classes. + * + * @author Nils Christian Ehmke + */ +public final class TraceAggregator extends AbstractTransformation<Trace, AggregatedTrace> { + + private final Map<TraceWrapper, List<Trace>> aggregationMap = new HashMap<>(); + + @Override + protected void execute(final Trace trace) { + final TraceWrapper wrapper = new TraceWrapper(trace); + if (!this.aggregationMap.containsKey(wrapper)) { + final List<Trace> aggregationList = new ArrayList<>(); + this.aggregationMap.put(wrapper, aggregationList); + } + this.aggregationMap.get(wrapper).add(trace); + } + + @Override + public void onTerminating() throws Exception { // NOPMD (the throws clause is forced by the framework) + this.aggregationMap.values().forEach(list -> super.getOutputPort().send(new AggregatedTrace(list))); + + super.onTerminating(); + } + + private static class TraceWrapper { + + private final Trace trace; + + public TraceWrapper(final Trace trace) { + this.trace = trace; + } + + @Override + public int hashCode() { + return this.trace.calculateHashCode(); + } + + @Override + public boolean equals(final Object obj) { + if (!(obj instanceof TraceWrapper)) { + return false; + } + return this.trace.isEqualTo(((TraceWrapper) obj).trace); + } + + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructionComposite.java b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructionComposite.java new file mode 100644 index 0000000000000000000000000000000000000000..985fef20ce49d2209cd38fb155101e337ee8ed60 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructionComposite.java @@ -0,0 +1,86 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.List; + +import kieker.analysis.traceanalysisdomain.Trace; +import kieker.common.record.IMonitoringRecord; +import kieker.common.record.controlflow.OperationExecutionRecord; +import kieker.common.record.flow.IFlowRecord; + +import teetime.framework.AbstractCompositeStage; +import teetime.framework.InputPort; +import teetime.framework.OutputPort; +import teetime.stage.CollectorSink; +import teetime.stage.MultipleInstanceOfFilter; +import teetime.stage.basic.distributor.Distributor; +import teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy; +import teetime.stage.basic.merger.Merger; + +/** + * This class is a composite {@code TeeTime} stage, which reconstruct traces based on the incoming records, adds statistical data and stores the traces. + * + * @author Nils Christian Ehmke + */ +public final class TraceReconstructionComposite extends AbstractCompositeStage { + + private final MultipleInstanceOfFilter<IMonitoringRecord> typeFilter; + private final CollectorSink<Trace> tracesCollector; + private final TraceStatisticsDecorator statisticsDecorator; + private final OutputPort<Trace> outputPort; + private final LegacyTraceReconstructor legacyReconstructor; + private final TraceReconstructor reconstructor; + + public TraceReconstructionComposite(final List<Trace> traces, final boolean activateAdditionalLogChecks) { + final Distributor<Trace> distributor = new Distributor<>(new CopyByReferenceStrategy()); + final Merger<Trace> merger = new Merger<>(); + + this.typeFilter = new MultipleInstanceOfFilter<>(); + this.tracesCollector = new CollectorSink<>(traces); + this.statisticsDecorator = new TraceStatisticsDecorator(); + this.reconstructor = new TraceReconstructor(activateAdditionalLogChecks); + this.legacyReconstructor = new LegacyTraceReconstructor(); + + this.outputPort = this.statisticsDecorator.getOutputPort(); + + super.connectPorts(this.typeFilter.getOutputPortForType(IFlowRecord.class), this.reconstructor.getInputPort()); + super.connectPorts(this.typeFilter.getOutputPortForType(OperationExecutionRecord.class), this.legacyReconstructor.getInputPort()); + super.connectPorts(this.reconstructor.getOutputPort(), merger.getNewInputPort()); + super.connectPorts(this.legacyReconstructor.getOutputPort(), merger.getNewInputPort()); + super.connectPorts(merger.getOutputPort(), distributor.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), this.tracesCollector.getInputPort()); + super.connectPorts(distributor.getNewOutputPort(), this.statisticsDecorator.getInputPort()); + } + + public int countIncompleteTraces() { + return this.reconstructor.countIncompleteTraces() + this.legacyReconstructor.countIncompleteTraces(); + } + + public int countDanglingRecords() { + return this.reconstructor.countDanglingRecords() + this.legacyReconstructor.countDanglingRecords(); + } + + public InputPort<IMonitoringRecord> getInputPort() { + return this.typeFilter.getInputPort(); + } + + public OutputPort<Trace> getOutputPort() { + return this.outputPort; + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructor.java b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructor.java new file mode 100644 index 0000000000000000000000000000000000000000..abe495fea2f912161caa6e906b1138b4a1ca9471 --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceReconstructor.java @@ -0,0 +1,161 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import java.util.ArrayList; +import java.util.Deque; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; +import kieker.common.record.flow.IFlowRecord; +import kieker.common.record.flow.trace.TraceMetadata; +import kieker.common.record.flow.trace.operation.AbstractOperationEvent; +import kieker.common.record.flow.trace.operation.AfterOperationEvent; +import kieker.common.record.flow.trace.operation.AfterOperationFailedEvent; +import kieker.common.record.flow.trace.operation.BeforeOperationEvent; + +import teetime.stage.basic.AbstractTransformation; + +/** + * Reconstruct traces based on the incoming instances of {@code IFlowRecord}. Currently only {@link TraceMetadata}, {@link BeforeOperationEvent} and + * {@link AfterOperationEvent} + * instances are supported. + * + * @author Nils Christian Ehmke + */ +final class TraceReconstructor extends AbstractTransformation<IFlowRecord, Trace> { + + private final Map<Long, TraceBuffer> traceBuffers = new HashMap<>(); + private final List<TraceBuffer> faultyTraceBuffers = new ArrayList<>(); + private final boolean activateAdditionalLogChecks; + private int danglingRecords; + + public TraceReconstructor(final boolean activateAdditionalLogChecks) { + this.activateAdditionalLogChecks = activateAdditionalLogChecks; + } + + public int countIncompleteTraces() { + return this.traceBuffers.size() + this.faultyTraceBuffers.size(); + } + + public int countDanglingRecords() { + return this.danglingRecords - this.faultyTraceBuffers.size(); + } + + @Override + protected void execute(final IFlowRecord input) { + if (input instanceof TraceMetadata) { + this.handleMetadataRecord((TraceMetadata) input); + } else if (input instanceof AbstractOperationEvent) { + this.handleOperationEventRecord((AbstractOperationEvent) input); + } + } + + private void handleMetadataRecord(final TraceMetadata record) { + final long traceID = record.getTraceId(); + final TraceBuffer newTraceBuffer = new TraceBuffer(record); + + this.traceBuffers.put(traceID, newTraceBuffer); + } + + private void handleOperationEventRecord(final AbstractOperationEvent input) { + final long traceID = input.getTraceId(); + final TraceBuffer traceBuffer = this.traceBuffers.get(traceID); + + if (traceBuffer != null) { + traceBuffer.handleEvent(input); + if (traceBuffer.isTraceComplete()) { + final Trace trace = traceBuffer.reconstructTrace(); + this.traceBuffers.remove(traceID); + super.getOutputPort().send(trace); + } + } else { + this.danglingRecords++; + } + } + + /** + * @author Nils Christian Ehmke + */ + private final class TraceBuffer { + + private final String hostname; + private final Deque<BeforeOperationEvent> stack = new LinkedList<>(); + private OperationCall root; + private OperationCall header; + private final long traceID; + + public TraceBuffer(final TraceMetadata traceMetadata) { + this.hostname = traceMetadata.getHostname(); + this.traceID = traceMetadata.getTraceId(); + } + + public void handleEvent(final AbstractOperationEvent record) { + if (record instanceof BeforeOperationEvent) { + this.handleBeforeOperationEventRecord((BeforeOperationEvent) record); + } else if (record instanceof AfterOperationEvent) { + this.handleAfterOperationEventRecord((AfterOperationEvent) record); + } + } + + private void handleBeforeOperationEventRecord(final BeforeOperationEvent record) { + this.stack.push(record); + + final OperationCall newCall = new OperationCall(this.hostname, record.getClassSignature(), record.getOperationSignature(), this.traceID, + record.getLoggingTimestamp()); + if (this.root == null) { + this.root = newCall; + } else { + this.header.addChild(newCall); + } + this.header = newCall; + } + + private void handleAfterOperationEventRecord(final AfterOperationEvent record) { + final BeforeOperationEvent beforeEvent = this.stack.pop(); + + this.header.setDuration(record.getTimestamp() - beforeEvent.getTimestamp()); + + if (record instanceof AfterOperationFailedEvent) { + this.header.setFailedCause(((AfterOperationFailedEvent) record).getCause()); + } + + this.header = this.header.getParent(); + + if (TraceReconstructor.this.activateAdditionalLogChecks) { + if (!beforeEvent.getOperationSignature().equals(record.getOperationSignature())) { + TraceReconstructor.this.faultyTraceBuffers.add(this); + TraceReconstructor.this.traceBuffers.remove(this.traceID); + } + } + } + + public Trace reconstructTrace() { + return new Trace(this.root, this.traceID); + } + + public boolean isTraceComplete() { + return this.stack.isEmpty(); + } + + } + +} diff --git a/src/main/java/kieker/analysis/stage/tracediagnosis/TraceStatisticsDecorator.java b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceStatisticsDecorator.java new file mode 100644 index 0000000000000000000000000000000000000000..ba1d6c972e619b7aa0cb5922a7d19b0ca6204ded --- /dev/null +++ b/src/main/java/kieker/analysis/stage/tracediagnosis/TraceStatisticsDecorator.java @@ -0,0 +1,84 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.stage.tracediagnosis; + +import kieker.analysis.traceanalysisdomain.OperationCall; +import kieker.analysis.traceanalysisdomain.Trace; + +import teetime.stage.basic.AbstractTransformation; + +/** + * This class is a {@code TeeTime} stage adding statistics (via the corresponding setters) to instances of {@link Trace}. The traces are forwarded to the output + * port. + * + * @author Nils Christian Ehmke + */ +public final class TraceStatisticsDecorator extends AbstractTransformation<Trace, Trace> { + + @Override + public void execute(final Trace trace) { + addTraceDepth(trace.getRootOperationCall()); + addTraceSize(trace.getRootOperationCall()); + addPercentValues(trace.getRootOperationCall(), trace.getRootOperationCall().getDuration()); + + super.getOutputPort().send(trace); + } + + private static int addTraceDepth(final OperationCall call) { + final int traceDepth; + + if (call.getChildren().isEmpty()) { + traceDepth = 0; + } else { + int maxTraceDepthOfChildren = 0; + + for (final OperationCall child : call.getChildren()) { + final int traceDepthOfChild = addTraceDepth(child); + maxTraceDepthOfChildren = Math.max(traceDepthOfChild, maxTraceDepthOfChildren); + } + + traceDepth = 1 + maxTraceDepthOfChildren; + } + + call.setStackDepth(traceDepth); + return traceDepth; + } + + private static int addTraceSize(final OperationCall call) { + int traceSize = 1; + + for (final OperationCall child : call.getChildren()) { + final int traceSizeOfChild = addTraceSize(child); + traceSize += traceSizeOfChild; + } + + call.setStackSize(traceSize); + return traceSize; + } + + private static void addPercentValues(final OperationCall call, final long rootDuration) { + if (call.getParent() == null) { + call.setPercent(100.0f); + } else { + call.setPercent((100.0f * call.getDuration()) / rootDuration); + } + + for (final OperationCall child : call.getChildren()) { + addPercentValues(child, call.getDuration()); + } + } +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java new file mode 100644 index 0000000000000000000000000000000000000000..f8454abca121a29f87adf39b313820304f477847 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractOperationCall.java @@ -0,0 +1,189 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +import java.util.ArrayList; +import java.util.List; + +/** + * This is an abstract base for classes representing operation calls (also called executions) within this application. As it can has multiple children, an instance + * of this class + * can represent a whole call tree. This class implements the both methods {@link OperationCall#equals(Object)} and {@link OperationCall#hashCode()}, allowing to + * easily check + * whether two traces are equal and should be in the same equivalence class. + * + * @author Nils Christian Ehmke + * + * @param <T> + * The precise type of the children. This should usually be the implementing class itself. + */ +public abstract class AbstractOperationCall<T extends AbstractOperationCall<T>> { + + private final List<T> children = new ArrayList<>(); + + private final String container; + private final String component; + private final String operation; + + private int stackDepth; + private int stackSize; + private String failedCause; + + public AbstractOperationCall(final String container, final String component, final String operation) { + this(container, component, operation, null); + } + + public AbstractOperationCall(final String container, final String component, final String operation, final String failedCause) { + this.container = container.intern(); + this.component = component.intern(); + this.operation = operation.intern(); + this.failedCause = (failedCause != null) ? failedCause.intern() : null; + } + + public void addChild(final T child) { + this.children.add(child); + } + + public final List<T> getChildren() { + return this.children; + } + + public final String getContainer() { + return this.container; + } + + public final String getComponent() { + return this.component; + } + + public final String getOperation() { + return this.operation; + } + + public final int getStackDepth() { + return this.stackDepth; + } + + public final void setStackDepth(final int stackDepth) { + this.stackDepth = stackDepth; + } + + public final int getStackSize() { + return this.stackSize; + } + + public final void setStackSize(final int stackSize) { + this.stackSize = stackSize; + } + + public final boolean isFailed() { + return (this.failedCause != null); + } + + public final String getFailedCause() { + return this.failedCause; + } + + public final void setFailedCause(final String failedCause) { + this.failedCause = (failedCause != null) ? failedCause.intern() : null; + } + + public final boolean containsFailure() { + return this.isFailed() || this.children.parallelStream().anyMatch(T::containsFailure); + } + + public final int calculateHashCode() { + final int prime = 31; + int result = 1; + + result = (prime * result) + ((this.children == null) ? 0 : this.calculateHashCodeForChildren()); + result = (prime * result) + ((this.component == null) ? 0 : this.component.hashCode()); + result = (prime * result) + ((this.container == null) ? 0 : this.container.hashCode()); + result = (prime * result) + ((this.failedCause == null) ? 0 : this.failedCause.hashCode()); + result = (prime * result) + ((this.operation == null) ? 0 : this.operation.hashCode()); + + return result; + } + + private final int calculateHashCodeForChildren() { + int hashCode = 1; + for (final T child : this.children) { + hashCode = (31 * hashCode) + (child == null ? 0 : child.calculateHashCode()); + } + return hashCode; + } + + @SuppressWarnings("unchecked") + public final boolean isEqualTo(final Object obj) { // NOPMD (this method violates some metrics) + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (this.getClass() != obj.getClass()) { + return false; + } + final T other = (T) obj; + if (this.children == null) { + if (other.getChildren() != null) { + return false; + } + } else { + final int length1 = this.children.size(); + final int length2 = other.getChildren().size(); + if (length1 != length2) { + return false; + } + for (int i = 0; i < length1; i++) { + if (!this.children.get(i).isEqualTo(other.getChildren().get(i))) { + return false; + } + } + } + if (this.component == null) { + if (other.getComponent() != null) { + return false; + } + } else if (!this.component.equals(other.getComponent())) { + return false; + } + if (this.container == null) { + if (other.getContainer() != null) { + return false; + } + } else if (!this.container.equals(other.getContainer())) { + return false; + } + if (this.failedCause == null) { + if (other.getFailedCause() != null) { + return false; + } + } else if (!this.failedCause.equals(other.getFailedCause())) { + return false; + } + if (this.operation == null) { + if (other.getOperation() != null) { + return false; + } + } else if (!this.operation.equals(other.getOperation())) { + return false; + } + return true; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/AbstractTrace.java b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractTrace.java new file mode 100644 index 0000000000000000000000000000000000000000..d387df6eb4c0eb163105d53ddfd924fc4c23ac18 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/AbstractTrace.java @@ -0,0 +1,70 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +/** + * This is an abstract base for classes representing traces (a tree of operation calls) within this application. Technically this class is just a container for a + * single {@link AbstractOperationCall} instance representing the root call of a whole call tree. Furthermore, this class implements the methods + * {@link AbstractTrace#equals(Object)} and {@link AbstractTrace#hashCode()}, allowing to put traces for example into a map to aggregate them. + * + * @author Nils Christian Ehmke + * + * @param <T> + * The type of the root node. + */ +public abstract class AbstractTrace<T extends AbstractOperationCall<T>> { + + private final T rootOperationCall; + + public AbstractTrace(final T rootOperationCall) { + this.rootOperationCall = rootOperationCall; + } + + public final T getRootOperationCall() { + return this.rootOperationCall; + } + + public final int calculateHashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + ((this.rootOperationCall == null) ? 0 : this.rootOperationCall.calculateHashCode()); + return result; + } + + @SuppressWarnings("rawtypes") + public final boolean isEqualTo(final Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (this.getClass() != obj.getClass()) { + return false; + } + final AbstractTrace other = (AbstractTrace) obj; + if (this.rootOperationCall == null) { + if (other.rootOperationCall != null) { + return false; + } + } else if (!this.rootOperationCall.isEqualTo(other.rootOperationCall)) { + return false; + } + return true; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedOperationCall.java b/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedOperationCall.java new file mode 100644 index 0000000000000000000000000000000000000000..24fb73f3993446ea37725b1852b501758115b7bf --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedOperationCall.java @@ -0,0 +1,108 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +/** + * This class represents an aggregated operation call within this application. It adds some properties that are only available due to aggregation, like the average + * duration of all calls. + * + * @author Nils Christian Ehmke + */ +public final class AggregatedOperationCall extends AbstractOperationCall<AggregatedOperationCall> { + + private long totalDuration; + private long medianDuration; + private long minDuration; + private long maxDuration; + private long meanDuration; + private int calls; + + public AggregatedOperationCall(final OperationCall call) { + super(call.getContainer(), call.getComponent(), call.getOperation(), call.getFailedCause()); + + for (final OperationCall child : call.getChildren()) { + super.addChild(new AggregatedOperationCall(child)); + } + + this.setStackDepth(call.getStackDepth()); + this.setStackSize(call.getStackSize()); + } + + public AggregatedOperationCall(final String container, final String component, final String operation, // NOPMD (a long parameter list cannot be avoided) + final String failedCause, final long totalDuration, final long medianDuration, final long minDuration, final long maxDuration, final long meanDuration, + final int calls) { + super(container, component, operation); + + this.totalDuration = totalDuration; + this.medianDuration = medianDuration; + this.minDuration = minDuration; + this.maxDuration = maxDuration; + this.meanDuration = meanDuration; + this.calls = calls; + + this.setFailedCause(failedCause); + } + + public long getTotalDuration() { + return this.totalDuration; + } + + public void setTotalDuration(final long totalDuration) { + this.totalDuration = totalDuration; + } + + public long getMedianDuration() { + return this.medianDuration; + } + + public void setMedianDuration(final long meanDuration) { + this.medianDuration = meanDuration; + } + + public long getMinDuration() { + return this.minDuration; + } + + public void setMinDuration(final long minDuration) { + this.minDuration = minDuration; + } + + public long getMaxDuration() { + return this.maxDuration; + } + + public void setMaxDuration(final long maxDuration) { + this.maxDuration = maxDuration; + } + + public long getMeanDuration() { + return this.meanDuration; + } + + public void setMeanDuration(final long avgDuration) { + this.meanDuration = avgDuration; + } + + public int getCalls() { + return this.calls; + } + + public void setCalls(final int calls) { + this.calls = calls; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedTrace.java b/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedTrace.java new file mode 100644 index 0000000000000000000000000000000000000000..68d8045501dd9b9ff7c10c50aeabb05fe473b460 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/AggregatedTrace.java @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +import java.util.List; + +/** + * This class represents an aggregated trace (also called a trace equivalence class) within this application. + * + * @author Nils Christian Ehmke + */ +public final class AggregatedTrace extends AbstractTrace<AggregatedOperationCall> { + + private final List<Trace> traces; + + public AggregatedTrace(final List<Trace> traces) { + super(new AggregatedOperationCall(traces.get(0).getRootOperationCall())); + + this.traces = traces; + } + + public List<Trace> getTraces() { + return this.traces; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/OperationCall.java b/src/main/java/kieker/analysis/traceanalysisdomain/OperationCall.java new file mode 100644 index 0000000000000000000000000000000000000000..f240af6db725bc0cbf0c2c38f55d1c38633c1a7d --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/OperationCall.java @@ -0,0 +1,85 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +/** + * This class represents a concrete operation call within this application. It adds some properties that are only required for concrete operation calls, like the + * trace ID and the + * duration. It extends the call tree mechanism (inherited from {@link AbstractOperationCall}) by a parent, allowing to navigate in both directions within the tree. + * + * @author Nils Christian Ehmke + */ +public final class OperationCall extends AbstractOperationCall<OperationCall> { + + private final long traceID; + + private OperationCall parent; + private float percent; + private long duration; + private long timestamp; + + public OperationCall(final String container, final String component, final String operation, final long traceID, final long timestamp) { + this(container, component, operation, null, traceID, timestamp); + } + + public OperationCall(final String container, final String component, final String operation, final String failedCause, final long traceID, + final long timestamp) { + super(container, component, operation, failedCause); + + this.traceID = traceID; + this.timestamp = timestamp; + } + + @Override + public void addChild(final OperationCall child) { + super.addChild(child); + child.parent = this; + } + + public OperationCall getParent() { + return this.parent; + } + + public float getPercent() { + return this.percent; + } + + public void setPercent(final float percent) { + this.percent = percent; + } + + public long getDuration() { + return this.duration; + } + + public void setDuration(final long duration) { + this.duration = duration; + } + + public long getTraceID() { + return this.traceID; + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(final long timestamp) { + this.timestamp = timestamp; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisdomain/Trace.java b/src/main/java/kieker/analysis/traceanalysisdomain/Trace.java new file mode 100644 index 0000000000000000000000000000000000000000..7a0f4e5e09fb8d8c25c783165c0f151114d80e25 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisdomain/Trace.java @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisdomain; + +/** + * This class represents a concrete trace within this application. It adds some properties that are only required for concrete traces, like the trace ID. + * + * @author Nils Christian Ehmke + */ +public final class Trace extends AbstractTrace<OperationCall> { + + private final long traceID; + + public Trace(final OperationCall rootOperationCall, final long traceID) { + super(rootOperationCall); + + this.traceID = traceID; + } + + public long getTraceID() { + return this.traceID; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysismodel/PropertiesModel.java b/src/main/java/kieker/analysis/traceanalysismodel/PropertiesModel.java new file mode 100644 index 0000000000000000000000000000000000000000..11e317ee6c431b9b6890f2fba3432c00e4799b98 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysismodel/PropertiesModel.java @@ -0,0 +1,178 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysismodel; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; +import java.util.concurrent.TimeUnit; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; + +//import org.apache.logging.log4j.LogManager; //TODO +//import org.apache.logging.log4j.Logger; //TODO + +/** + * @author Nils Christian Ehmke + */ +public final class PropertiesModel { + + // private static final Logger LOGGER = LogManager.getLogger(PropertiesModel.class);//TODO + private static final PropertiesModel INSTANCE = new PropertiesModel(); + + private static final String KEY_TIMEUNIT = "timeunit"; + private static final String KEY_OPERATIONS = "operations"; + private static final String KEY_COMPONENTS = "components"; + private static final String KEY_GRAPHVIZ_PATH = "graphvizpath"; + private static final String KEY_ADDITIONAL_LOG_CHECKS = "additionalLogChecks"; + private static final String KEY_REGULAR_EXPRESSIONS = "regularExpressions"; + + private static final String KEY_GITLAB_URL = "GitLabURL"; + private static final String KEY_TRAC_URL = "TracURL"; + + private String graphvizPath; + private TimeUnit timeUnit; + private ComponentNames componentNames; + private OperationNames operationNames; + private boolean additionalLogChecks; + private boolean activateRegularExpressions; + private String gitLabURL; + private String tracURL; + + public PropertiesModel() { + this.loadSettings(); + } + + private void loadSettings() { + final Preferences preferences = Preferences.userNodeForPackage(PropertiesModel.class); + + this.graphvizPath = preferences.get(PropertiesModel.KEY_GRAPHVIZ_PATH, "."); + this.timeUnit = TimeUnit.valueOf(preferences.get(PropertiesModel.KEY_TIMEUNIT, TimeUnit.NANOSECONDS.name())); + this.componentNames = ComponentNames.valueOf(preferences.get(PropertiesModel.KEY_COMPONENTS, ComponentNames.LONG.name())); + this.operationNames = OperationNames.valueOf(preferences.get(PropertiesModel.KEY_OPERATIONS, OperationNames.SHORT.name())); + this.additionalLogChecks = Boolean.valueOf(preferences.get(PropertiesModel.KEY_ADDITIONAL_LOG_CHECKS, Boolean.FALSE.toString())); + this.activateRegularExpressions = Boolean.valueOf(preferences.get(PropertiesModel.KEY_REGULAR_EXPRESSIONS, Boolean.FALSE.toString())); + + final Properties properties = new Properties(); + final ClassLoader classLoader = PropertiesModel.class.getClassLoader(); + try (InputStream inputStream = classLoader.getResourceAsStream("config.properties")) { + properties.load(inputStream); + this.gitLabURL = properties.getProperty(PropertiesModel.KEY_GITLAB_URL); + this.tracURL = properties.getProperty(PropertiesModel.KEY_TRAC_URL); + } catch (final IOException e) { + // PropertiesModel.LOGGER.error(e); //TODO + } + } + + private void saveSettings() { + final Preferences preferences = Preferences.userNodeForPackage(PropertiesModel.class); + + preferences.put(PropertiesModel.KEY_GRAPHVIZ_PATH, this.graphvizPath); + preferences.put(PropertiesModel.KEY_TIMEUNIT, this.timeUnit.name()); + preferences.put(PropertiesModel.KEY_COMPONENTS, this.componentNames.name()); + preferences.put(PropertiesModel.KEY_OPERATIONS, this.operationNames.name()); + preferences.put(PropertiesModel.KEY_ADDITIONAL_LOG_CHECKS, Boolean.toString(this.additionalLogChecks)); + preferences.put(PropertiesModel.KEY_REGULAR_EXPRESSIONS, Boolean.toString(this.activateRegularExpressions)); + + try { + preferences.flush(); + } catch (final BackingStoreException e) { + // PropertiesModel.LOGGER.error(e);//TODO + } + } + + public String getGraphvizPath() { + return this.graphvizPath; + } + + public void setGraphvizPath(final String graphvizPath) { + this.graphvizPath = graphvizPath; + this.saveSettings(); + } + + public TimeUnit getTimeUnit() { + return this.timeUnit; + } + + public void setTimeUnit(final TimeUnit timeUnit) { + this.timeUnit = timeUnit; + this.saveSettings(); + } + + public ComponentNames getComponentNames() { + return this.componentNames; + } + + public void setComponentNames(final ComponentNames componentNames) { + this.componentNames = componentNames; + this.saveSettings(); + } + + public OperationNames getOperationNames() { + return this.operationNames; + } + + public void setOperationNames(final OperationNames operationNames) { + this.operationNames = operationNames; + this.saveSettings(); + } + + public static PropertiesModel getInstance() { + return PropertiesModel.INSTANCE; + } + + public boolean isAdditionalLogChecks() { + return this.additionalLogChecks; + } + + public void setAdditionalLogChecks(final boolean additionalLogChecks) { + this.additionalLogChecks = additionalLogChecks; + this.saveSettings(); + } + + public boolean isActivateRegularExpressions() { + return this.activateRegularExpressions; + } + + public void setActivateRegularExpressions(final boolean activateRegularExpressions) { + this.activateRegularExpressions = activateRegularExpressions; + this.saveSettings(); + } + + public String getGitLabURL() { + return this.gitLabURL; + } + + public String getTracURL() { + return this.tracURL; + } + + /** + * @author Nils Christian Ehmke + */ + public enum ComponentNames { + SHORT, LONG + } + + /** + * @author Nils Christian Ehmke + */ + public enum OperationNames { + SHORT, LONG + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisutil/Statistics.java b/src/main/java/kieker/analysis/traceanalysisutil/Statistics.java new file mode 100644 index 0000000000000000000000000000000000000000..f4b12930d7002351ee1572ff854087f4f87e4cd3 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisutil/Statistics.java @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisutil; + +/** + * @author Nils Christian Ehmke + */ +public final class Statistics { + + private final long totalDuration; + private final long meanDuration; + private final long medianDuration; + private final long minDuration; + private final long maxDuration; + + public Statistics(final long totalDuration, final long meanDuration, final long medianDuration, final long minDuration, final long maxDuration) { + this.totalDuration = totalDuration; + this.meanDuration = meanDuration; + this.medianDuration = medianDuration; + this.minDuration = minDuration; + this.maxDuration = maxDuration; + } + + public long getTotalDuration() { + return this.totalDuration; + } + + public long getMeanDuration() { + return this.meanDuration; + } + + public long getMedianDuration() { + return this.medianDuration; + } + + public long getMinDuration() { + return this.minDuration; + } + + public long getMaxDuration() { + return this.maxDuration; + } + +} diff --git a/src/main/java/kieker/analysis/traceanalysisutil/StatisticsUtility.java b/src/main/java/kieker/analysis/traceanalysisutil/StatisticsUtility.java new file mode 100644 index 0000000000000000000000000000000000000000..ad102345d759ff78b16a8344ca58ab5b41e3d5f3 --- /dev/null +++ b/src/main/java/kieker/analysis/traceanalysisutil/StatisticsUtility.java @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright 2015 Kieker Project (http://kieker-monitoring.net) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ + +package kieker.analysis.traceanalysisutil; + +import java.util.Collections; +import java.util.List; + +/** + * @author Nils Christian Ehmke + */ +public final class StatisticsUtility { + + private StatisticsUtility() {} + + public static Statistics calculateStatistics(final List<Long> durations) { + Collections.sort(durations); + + long totalDuration = 0; + for (final Long duration : durations) { + totalDuration += duration; + } + + final long minDuration = durations.get(0); + final long maxDuration = durations.get(durations.size() - 1); + final long meanDuration = totalDuration / durations.size(); + final long medianDuration = durations.get(durations.size() / 2); + + return new Statistics(totalDuration, meanDuration, medianDuration, minDuration, maxDuration); + } + +}