+static void compute_load_imbalance()
+{
+ unsigned n = loads.size();
+ load_avg = std::accumulate(loads.begin(), loads.end(), 0.0) / n;
+ double variance = 0.0;
+ double epsilon = 0.0;
+ for (unsigned i = 0 ; i < n ; ++i) {
+ double diff = loads[i] - load_avg;
+ variance += diff * diff;
+ epsilon += diff;
+ }
+ variance = (variance - (epsilon * epsilon) / n) / n;
+ load_stddev = sqrt(variance);
+}
+