Class Finding

java.lang.Object
org.acemq.workloads.rules.Finding

public final class Finding extends Object
One thing a rule noticed, with the measurement that made it say so.

Evidence, not advice

Every finding must carry the observation it came from. This is a deliberate constraint on what this library is willing to say.

A load tool that prints "increase prefetch to 250" is guessing. It does not know the handler's processing time distribution, the message size, the network, the disk, or what else shares the broker — and a confident recommendation from a tool is followed, which makes a wrong one worse than silence.

What a tool can say honestly is what it measured and what that rules in or out: "publishers offered 300,000/s and achieved 180,000/s; connections were blocked for 43% of the run and the free-disk alarm was in effect". That is defensible, it is actionable, and every word of it is an observation.

So a finding has an observation() — what was measured — and an implication() — what that means for the result. Neither is a prescription.

  • Method Details

    • of

      public static Finding of(String rule, Severity severity, String observation, String implication)
      Parameters:
      rule - which rule fired
      severity - how much it matters
      observation - what was measured, with the numbers in it
      implication - what that means for the result
      Returns:
      the finding
    • of

      public static Finding of(String rule, Severity severity, String observation, String implication, String detail)
      Parameters:
      rule - which rule fired
      severity - how much it matters
      observation - what was measured
      implication - what it means
      detail - supporting numbers, for a verbose report
      Returns:
      the finding
    • rule

      public String rule()
    • severity

      public Severity severity()
    • observation

      public String observation()
      Returns:
      what was measured. Always contains numbers, because a rule without them is an opinion
    • implication

      public String implication()
      Returns:
      what the observation means for this result
    • detail

      public Optional<String> detail()
    • invalidatesRun

      public boolean invalidatesRun()
      Returns:
      whether this finding means the run did not measure what it set out to measure
    • format

      public String format()
      Returns:
      a line for the report
    • toString

      public String toString()
      Overrides:
      toString in class Object