Tesla posts net profit for fifth straight quarter