Determining the efficiency of devices