Class Objective

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

public final class Objective extends Object
What the run has to achieve to count as a pass.

 .expect(Objective.throughputAtLeast(300_000))
 .expect(Objective.p99Below(Duration.ofMillis(50)))
 

This is the "we need 300,000 a second, let us test" case, expressed so a build can fail on it.

An objective is only judged on a valid run

If the generator could not offer the rate, or the broker was blocked by a resource alarm for most of the run, then the throughput measured is not the broker's answer to the question. Objectives are still evaluated, but the report's WorkloadReport.isValid() is false and WorkloadReport.passed() is false regardless — a run that did not measure the thing cannot pass, and it must not be reported as the broker failing either.

  • Method Details

    • throughputAtLeast

      public static Rule throughputAtLeast(long messagesPerSecond)
      Parameters:
      messagesPerSecond - the end-to-end rate that must be sustained. Measured on messages that were consumed, not published, because a publish rate the consumers never matched is a queue filling up rather than a system running
      Returns:
      the rule
    • p99Below

      public static Rule p99Below(Duration budget)
      Parameters:
      budget - the 99th percentile end-to-end latency must be under this
      Returns:
      the rule
    • percentileBelow

      public static Rule percentileBelow(double percentile, Duration budget)
      Parameters:
      percentile - 50, 90, 99, 99.9 or 99.99
      budget - the ceiling
      Returns:
      the rule
    • noMessagesLost

      public static Rule noMessagesLost()
      Every published message must arrive.

      Note this compares counts. It detects loss and it does not detect duplication, which needs the sequence numbers and is a different measurement.

      Returns:
      the rule