@@ -589,18 +589,16 @@ public Builder withExclusionThreshold(double exclusionThreshold) {
589589 * Sets the scale to use for the resulting latency aware policy.
590590 * <p/>
591591 * The {@code scale} provides control on how the weight given to older latencies
592- * decreases over time. For a given host, if a new latency \(l\) is received at
593- * time \(t\) , and the previously calculated average is \( prev\) calculated at
594- * time \(t'\) , then the newly calculated average \( avg\) for that host is calculated
592+ * decreases over time. For a given host, if a new latency {@code l} is received at
593+ * time {@code t} , and the previously calculated average is {@code prev} calculated at
594+ * time {@code t'} , then the newly calculated average {@code avg} for that host is calculated
595595 * thusly:
596- * \[
597- * d = \frac{t - t'}{scale} \\
598- * \alpha = 1 - \left(\frac{\ln(d+1)}{d}\right) \\
599- * avg = \alpha * l + (1-\alpha) * prev
600- * \]
596+ * <pre>{@code d = (t - t') / scale
597+ * alpha = 1 - (ln(d+1) / d)
598+ * avg = alpha * l + (1 - alpha * prev)}</pre>
601599 * Typically, with a {@code scale} of 100 milliseconds (the default), if a new
602- * latency is measured and the previous measure is 10 millisecond old (so \( d=0.1\) ),
603- * then \(\ alpha\) will be around \( 0.05\) . In other words, the new latency will
600+ * latency is measured and the previous measure is 10 millisecond old (so {@code d=0.1} ),
601+ * then {@code alpha} will be around {@code 0.05} . In other words, the new latency will
604602 * weight 5% of the updated average. A bigger scale will get less weight to new
605603 * measurements (compared to previous ones), a smaller one will give them more weight.
606604 * <p/>
@@ -612,7 +610,7 @@ public Builder withExclusionThreshold(double exclusionThreshold) {
612610 * @param scale the scale to use.
613611 * @param unit the unit of {@code scale}.
614612 * @return this builder.
615- * @throws IllegalArgumentException if {@code scale <e; 0}.
613+ * @throws IllegalArgumentException if {@code scale <= 0}.
616614 */
617615 public Builder withScale (long scale , TimeUnit unit ) {
618616 if (scale <= 0 )
0 commit comments