compute energy density and efficiency in tests