histogram.ksTest(other)


  • other <Histogram> 用来比较的直方图。
  • 返回:<number> KS D统计量,介于0.0和1.0之间。

计算 Kolmogorov-Smirnov 检验统计量,用于比较此直方图的分布与 other 的分布。值为 0 表示分布相同;接近 1 的值表示分布完全不相交。通过比较前后的直方图,用于检测性能回归很有用。

🌐 Computes the Kolmogorov-Smirnov test statistic comparing this histogram's distribution to other. A value of 0 indicates identical distributions; values close to 1 indicate completely disjoint distributions. Useful for detecting performance regressions by comparing before/after histograms.