Second sentence. "After running the marathon in record time, Julia wanted to sleep for the rest of the day." This is because this is a complex sentence; the first clause "after running the marathon in record time" is a dependent clause, and must be followed by a comma before the independent clause "Julia wanted to sleep for the rest of the day."