Performance engineering

Offered load accounting

Include work not started. Executed Java 21 functional example, not a performance claim.

Formal Syntax & Structure

java syntaxjava
offered - started

Working Example

Example Snippetjava
public class Main {    record Counts(long offered,long started,long succeeded) { Counts { if(succeeded<0||started<succeeded||offered<started) throw new IllegalArgumentException(); } }    public static void main(String[] args) {        var s=new Counts(1000,900,850);        System.out.println(s.offered()-s.started());        System.out.println(s.started()-s.succeeded());        System.out.println(s.succeeded()/(double)s.offered());    }}
Java Reference