- if (samples==nullptr)
- samples = xbt_dict_new_homogeneous(free);
-
- local_data_t *data = static_cast<local_data_t *>(xbt_dict_get_or_null(samples, loc));
- if (data==nullptr) {
- xbt_assert(threshold>0 || iters>0,
+ auto insert = samples.emplace(loc, LocalData{
+ threshold, // threshold
+ 0.0, // relstderr
+ 0.0, // mean
+ 0.0, // sum
+ 0.0, // sum_pow2
+ iters, // iters
+ 0, // count
+ true // benching (if we have no data, we need at least one)
+ });
+ LocalData& data = insert.first->second;
+ if (insert.second) {
+ XBT_DEBUG("XXXXX First time ever on benched nest %s.", loc.c_str());
+ xbt_assert(threshold > 0 || iters > 0,