"...the end of the song arrives and you are wondering how you got there?"
This may indicate that you've lost focus on your performance. This is, in general, not productive practice. To play any instrument well, one must be focused. To overcome the situation (lack of attention/focus) you can focus on some aspect of the work (i.e., intonation, phrasing,and dynamics).
I would suggest that you never let your mind wander while you practice. Put the same focus into your practice as you would into a live performance. A little thoughtful practice is more effective than to go through motions while one's mind is somewhere else.