void compress_rsd(rsd_queue *queue, replay_op *operation, int push) { ... if(merge_iter->data.time[MIN_TIME] > target_iter->data.time[MIN_TIME]) merge_iter->data.time[MIN_TIME] = target_iter->data.time[MIN_TIME]; // Set the maximum time value for the merged node if(merge_iter->data.time[MAX_TIME] < target_iter->data.time[MAX_TIME]) merge_iter->data.time[MAX_TIME] = target_iter->data.time[MAX_TIME]; // Sanity check for numAggregated if(merge_iter->numAggregated <= 0 || target_iter->numAggregated <= 0) { printf("Number of nodes aggregated into a single node cannot be less than one:merge %d, target %d", merge_iter->numAggregated, target_iter->numAggregated); exit(1); } // Compute and set the average time value for the merged node. // Compute the new value for the number of nodes aggregated into this one merge_iter->data.time[AVG_TIME] = (merge_iter->data.time[AVG_TIME]*merge_iter->numAggregated) + (target_iter->data.time[AVG_TIME]*target_iter->numAggregated); merge_iter->numAggregated += target_iter->numAggregated; merge_iter->data.time[AVG_TIME] /= merge_iter->numAggregated; ... }
Aggregation on Internode compression was similar. There was an internode compression call in transfer.c called merge_queues. Identical code additions were made to this function in the relevant places.