It paid off when he won silver in the gruelling 1,500-metre freestyle on Saturday's final night of swimming. The 23-year-old from Victoria moved up the podium from his bronze finish four years ago in Beijing.
"This year was about pushing myself beyond my means and knowing that feeling," Cochrane said. "After I had a hard set, I'd think about that feeling so I knew when I got to race day, nothing was going to be that hard."
Sun Yang of China took gold in 14 minutes 31 seconds, lowering his world record by over three seconds. With Sun controlling the race by the 500-metre mark, Cochrane duelled for silver.
South Korea's Park Tae-hwan swam second in the first few opening laps, but the 400-metre silver medallist was overtaken by Cochrane by the midway point.
Cochrane then had to hold off a charging Oussama Mellouli of Tunisia, the 2008 Olympic champion, over the final 100 metres. Cochrane swam the fastest time of his life in 14:39.63 seconds. Mellouli finished in 14:40.31.
"I was going to fight, probably to the death, to make sure he didn't get his hand on the wall first," Cochrane said.
The race began with drama. Apparently hearing a noise in the crowd, Sun left the blocks before the starter's gun, while everyone else remained on the blocks. That could have meant disqualification. Sun sat down in a chair behind the blocks looking dismayed.
"I couldn't hear the beep — there was some noise," was Sun's explanation. "I didn't expect the little accident to happen at the start. At that moment, I was so scared."
Officials waved Sun back on the blocks and spectators were told to be quiet. While having Sun out of the field would have improved Cochrane's chances for gold, the Canadian never entertained the thought his rival wouldn't be allowed to race.
"I kind of assumed he wouldn't be out, just the way he fell in the water," he said. "I was surprised how quickly they got us back on the blocks. We prepare for anything. He was pretty pissed off by that, but it's such a little thing in the grand scheme of thing.
"It's going to be 15 minutes of pain no matter what. I think he got his feet wet first."
Cochrane's silver was Canada's second swim medal of the Olympics. Brent Hayden of Mission, B.C., earned bronze in the 100 freestyle.
Sun collected his second gold medal of the Games following his victory in the 400 on the opening day of competition.
Cochrane thought he would swim against Sun in that final, but a disqualification of Park in the heats was overturned. That bumped Cochrane out of the last berth for the final.
"The 400 I thought was a lost opportunity," Cochrane said. "The beginning of the meet was not the way I wanted it, so I know I had to go out with a bang or else I wouldn't be happy with the whole experience."
At a training camp in Hawaii just prior to the Summer Games, Cochrane deliberately set out to train so hard that he vomited.
"Just because I know that's when my lactate production is so high, my body just rejects everything," Cochrane explained. "I did it a couple times."
After receiving his silver medal, Cochrane handed his podium bouquet to his mother Donna and waved to his father John.
"My dad drove me to the pool every day at 5:30 for 10 years," Cochrane said. "It's for both of them. My mom was always there cooking dinner every night to make sure I was refuelled every day."
As for the pain of the 1,500, Cochrane says watching his brother Liam dealing with a badly broken jaw from a bike accident a few years ago put his sport in perspective.
"Watching him through that, he was smiling two days later," Cochrane recalls. "I was like 'nothing I really do is that type of pain.'
"This is the happiest I've been I think after any race in my career. The surprising swims are usually the best, but this wasn't surprising at all. This is what I've worked towards and this is definitely the best feeling I've had."
Canada's two medals in London improves on the single bronze won by Cochrane in Beijing. Canadian swimmers won zero medals in 2004. Cochrane's silver is the highest finish by a Canadian swimmer at the Olympics since Marianne Limpert's silver in 1996.
Richard Weinberger of Surrey, B.C., has medal potential in the open-water, 10-kilometre swim next week. Swimming Canada chief executive officer Pierre Lafontaine wanted "two or three" medals out of the swim team.
Canada missed its objective of putting swimmers in over 10 finals, racing in just seven.
"Obviously we're still trying to claw our way to the top of the podium," Cochrane said. "We've changed our complete mind set on the team.
"Our younger swimmers talk about making finals, talk about what they want to do and it's not about the negative. We've had a couple of ninth-place and 17th places, the hard finishes, but it builds our character and it's exciting to see the potential in our national team for the decade to come."
Also on the final day of swimming, Canada's medley relay team of Hayden, Scott Dickens of Burlington, Ont., Charles Francis of Cowansville, Que., and Joe Bartoch of London, Ont., finished eighth. Victoria Poon of Montreal was 15th in the women's 50-metre freestyle.
Also on HuffPost