+void process::convergence_check()
+{
+ double load_diff = std::fabs(real_load - total_load_average);
+ bool converged = load_diff <= load_diff_threshold;
+
+ if (convergence >= 0.0) {
+ if (!converged) {
+ XBT_VERB("current load has diverged: %g (%.4g%%)",
+ real_load, 100.0 * load_diff / total_load_average);
+ convergence = -1.0;
+ }
+ } else {
+ if (converged) {
+ XBT_VERB("current load has converged: %g (%.4g%%)",
+ real_load, 100.0 * load_diff / total_load_average);
+ convergence = MSG_get_clock();
+ }
+ }
+}
+