time and % time added in printing.

obj is an iterable. You should check inside each iterable if it contain a profile attribute. So the check should be elsewhere.