Class BuildMetric

    • Field Detail

      • myKey

        @NotNull
        protected final String myKey
      • myDescription

        @NotNull
        protected final String myDescription
      • myFormat

        @Nullable
        protected final String myFormat
    • Constructor Detail

      • BuildMetric

        public BuildMetric​(@NotNull
                           String key,
                           @NotNull
                           String description)
      • BuildMetric

        public BuildMetric​(@NotNull
                           String key,
                           @NotNull
                           String description,
                           @Nullable
                           String format)
        Creates new build metric with the specified key, description and format
        Parameters:
        key - getKey()
        description - getDescription()
        format - getFormat()
    • Method Detail

      • getKey

        @NotNull
        public String getKey()
        Return metric key. The key should be unique throughout the system. If two metrics have the same key, one of them will override another
        Returns:
        see above
      • getDescription

        @NotNull
        public String getDescription()
        Human-readable metric description in lower case
        Returns:
        see above
      • getFormat

        @Nullable
        public String getFormat()
        Metric format used for metric value representation. For supported formats see ValueType.getValueFormat()}
        Returns:
        see above
      • calculateMetric

        @Nullable
        public abstract BigDecimal calculateMetric​(SBuild build)
        Metric calculator
        Returns:
        metric value