measure the efficiency