Calculating the average waiting time of tasks I have proposed a load balancing algorithm for a group of homogeneous processing devices and now I want to measure the average waiting time to see if my algorithm is successful in decreasing the waiting time. I have considered number of tasks on each device as the load of that device.

Imagine at first there are 54 tasks that is distributed like this between devices: 


  device1 = 32
  
  device2 = 20
  
  device3 = 2


And after load balancing 15 tasks are transferred from device1 to device3 and these values change to:


  device1 = 17
  
  device2 = 20
  
  device3 = 17


Now I want to calculate and compare average waiting time before and after the load balancing, but I'm confused about which tasks to consider.

Should I consider all 54 tasks and measure the waiting time of all these 54 tasks

Or

should I only consider 15 tasks that were transferred and calculate the waiting time of these 15 tasks before and after load balancing?
From the two options, the first is the (only) reasonable approach. The second one is absolutely useless; details follow:


If you are trying to minimize the waiting time of the tasks that were shifted, then the best algorithm simply reschedules no tasks at all. The total time of transferred tasks is zero and, thus, optimal. Even if you require at least one task to be transferred, the best algorithm then simply picks the one with the least running time and transfers it to the least loaded queue. In both cases it could hardly be said the algorithm does something useful.
If you are trying to maximize the waiting time of the tasks which were rescheduled, then consider the algorithm which permutates all tasks between the devices. This naturally maximizes said measure and, again, hardly qualifies as a sensible load balancing algorithm.