nl_tokens: Combines { @link PerformanceStats } instances e . g . from different Simulator Workers . <p > For the real - time performance monitor during the { @link TestPhase#RUN } the maximum value should be set so we get the maximum operation count and throughput values of all { @link PerformanceStats } instances of the last interval . <p > For the total performance number and the performance per Simulator Agent the added values should be set so we get the summed up operation count and throughput values . <p > The method always sets the maximum values for latency .
pl_tokens: public void add ( PerformanceStats other , boolean addOperationCountAndThroughput ) { if ( other . isEmpty ( ) ) { return ; } if ( isEmpty ( ) ) { operationCount = other . operationCount ; intervalThroughput = other . intervalThroughput ; totalThroughput = other . totalThroughput ; intervalLatencyAvgNanos = other . intervalLatencyAvgNanos ; intervalLatency999PercentileNanos = other . intervalLatency999PercentileNanos ; intervalLatencyMaxNanos = other . intervalLatencyMaxNanos ; } else { if ( addOperationCountAndThroughput ) { operationCount += other . operationCount ; intervalThroughput += other . intervalThroughput ; totalThroughput += other . totalThroughput ; } else { operationCount = <mask> ( operationCount , other . operationCount ) ; intervalThroughput = max ( intervalThroughput , other . intervalThroughput ) ; totalThroughput = max ( totalThroughput , other . totalThroughput ) ; } intervalLatencyAvgNanos = max ( intervalLatencyAvgNanos , other . intervalLatencyAvgNanos ) ; intervalLatency999PercentileNanos = max ( intervalLatency999PercentileNanos , other . intervalLatency999PercentileNanos ) ; intervalLatencyMaxNanos = max ( intervalLatencyMaxNanos , other . intervalLatencyMaxNanos ) ; } }