How does one measure the dedication needed to reach the top in the highly competitive world of tennis?

How about this? You are someone who does not drink, smoke, gamble or go to nightclubs. You play Playstation, but not as much as people think. You watch action movies and Will Ferrell comedies as a gentle relaxation. But you love pizza. Then you hire a top sports nutritionist. He predictably scorns pizza but is happy that you have it as a treat. Yet you stop eating it. This is a motif for everything Murray has done. He goes the extra yard, inch by inch.

Watch the Murrayball Sports Short video below.

One of his camp told me: "If it was proven that going to bed at 9pm every night would improve his game by 0.000005%, Andy would be saying goodnight at five to nine."

Murray has never been a fan of training. As Emilio Sanchez, who coached Murray at the academy in Barcelona, pointed out: "Most of the young kids, with such a big discipline, struggle in different ways.

"I remember we had to go after him to do certain things, but this we do with all the kids. He was pretty good but they always like the fun things. He always loved soccer, he loved Barca, and always loved to go and play soccer. Sometimes he was not so keen to do the more physical work, but this is normal with a 15-year-old."

Now Murray trains like a demon. He hates running without a ball to chase, yet runs in reps until he is sick. He has taken his body to a level where only Novak Djokovic can match him in a draining match. The gains have been huge but have been made marginally, moment by aching moment in the gym, on the court, or on the sand of Miami.

As a teenager Murray appreciated that he had to become fitter to beat the best men. His growing body was beset by pains. He has, too, a bipartite patella on his knee – the bones on his right knee cap have not fused – which gives him regular pain but which he is careful to mention rarely.

The RICE principle (rest, ice, compression, elevation) is used to combat any pain after a match but Murray has been dealing with the problem since his childhood, even though it was only formally identified when he was 16. He also uses Bikram yoga, ice baths and physio to alleviate discomfort.

The patella is a problem, not an insurmountable one. Murray has overcome it to sustain an astonishing level of fitness and to embark on a fitness programme that is both precise and demanding.

The leading figure in the Murray fitness regime is Jez Green, who has been working with the US Open champion for more than five years. Green sees tennis as highly specific in the demands it places on athletes, therefore the conditioning of these players must mirror the specific movements that occur in a match.

He has been astonished at the performance of Murray. The Scot as a youngster was viewed as gangly and awkward. Green, who has watched him at close quarters and measured every turn, every pace, knows that his charge has developed into a sleek, powerful athlete.

"I still find it hard to believe all the things that he can do," he said when mentoring the Scot's 2012 training block in Miami. "It's a tough time to be a tennis player. What you're seeing in this generation is a group of guys with incredible genetics: you can try to play like Roger Federer, you can imitate his footwork, but he is just born with something that sets him apart. The work you do as a fitness trainer is about trying to maximise that.

"Andy is naturally fast but he is also so strong: on his best day he can do 27 pull-ups and push 300 pounds on the leg-press. He could probably run a 50-second 400 metres if he trained for it. He is a big powerful guy, whereas Novak [Djokovic] has a wiry strength; his flexibility is extraordinary.

"Andy has lazy speed – by which I mean that he doesn't look as if he's moving that fast, but it's actually deceptive. He's been clocked at 10 metres per second over very short intervals, maybe even as short as a single step, which is as fast as Usain Bolt. I'm not saying that he is that fast over 100 metres, but he has great acceleration when he is chasing down a drop shot.

"Even more valuable than his flat speed is the ability to stop and turn so quickly. He's putting three times his bodyweight through his legs in that moment, so they have to be seriously strong. But above all he is fast with his eyes: he picks up the cues so quickly and he knows where the ball is going that much faster than almost anyone else. All the guys in the top 10 have that ability to some extent."

The brutal nature of modern tennis has inflicted its wounds on Murray, but there is a misconception that he is injury prone.

He pulled out of the 2013 French Open because of a back injury; he missed Wimbledon in 2007 due to a wrist injury and a thigh injury caused him to withdraw from the World Masters Finals in 2011, but his record of fighting on to the end of matches – no matter the injury – is excellent.

"Andy's fitness record is good, even if he can't quite match up to Federer's," says Green. "Not retiring from a single match in almost a thousand outings is just crazy."

This verdict was delivered before Murray limped out of a match against Marcel Granollers in Rome in 2013. However, Murray's natural instinct is to battle on. The prime example of this was the Scot's performance against Viktor Troicki at the 2011 French Open, when he beat the then world No.15 on a bad ankle after having given up a two-set lead.

A year later at Roland Garros, he overcame Jarkko Nieminen after suffering from severe back spasms. Green has an explanation for how the top players manage to prevail despite hitting the pain barriers during a match.

"These guys are so strong they can compensate if they have a problem: it's almost like they switch over to other muscle groups, like a computer running a different programme," he says.

He emphasises that this is not a matter of good fortune. "Andy's training is very specific: we've never done a bench press, for instance, because tennis is all about back strength. It's a pulling sport, not a pushing sport, in that you use your big muscle groups to pull the racket back and turn your body into a spring. Then you just unwind and drive with your legs."

So what are the specifics of a Murray day in Miami? This programme, again, adheres to the theory of marginal gains. Murray's body is constantly changing so the regime has to fit in with that reality.

A normal day starts after breakfast with a practice session on court from 9 till 11.30. Then it is a light lunch followed by another two hours on court and then into the gym for weights or an endurance session.

"In the gym, the endurance sessions are an hour and when I'm doing weights it can often take longer because you take a rest in between sets. The days are five-and-a-half to six hours' work," says Murray. This refers to the 2012 block. In 2011, Murray started his day at 6.30am running on the beach. This, however, caused a stiffness that impacted on the next day's training. Murray now uses a VersaClimber. The best definition of this piece of equipment is that it is a lump of metal that produces pain, but it may be more informative to describe it as an upright piece of gym equipment that demands the athlete uses arms and legs in a climbing motion.

"It's been around ages that machine, a lot of the boxers and UFC fighters use it," says Murray, who started using it early in 2012. "The endurance sessions, the speed work, that's hard. But the stuff on the VersaClimber, that's the hardest.

"There are loads of different sessions you can do. The other day I did one minute on, one minute off for an hour. So I did 30 minutes of work, 30 minutes of resting. I've done four minutes on, one minute off. Three minutes on, three minutes off. It's all working at different heart rates; we have it hooked up to computers so we can see how hard I'm working.

"I try to make sure that the first session I go on I'm not working flat out, so I build it up and then by the middle to the end of the training block you're starting to set good numbers and good levels."

The speed endurance tests are all linked to tennis situations. Murray explains: "We've got stats from some of my matches, like at the Australian Open at the beginning of the year [2011]. We've got the duration of the points in one of my sets at the Australian Open, so there are seven different trails.

"You start at one, and the first trail could be 24 seconds and you do it for 24 seconds, then you have the 25-second break in between and then the next point might be 40 seconds, you do that, you just move.

"I always did these drills but I never did them as specifically as I do now, because we're starting to get the data from some of my matches to make sure I'm doing the right amount of time.

"It can be hard sometimes in tennis, because you never know what's going to happen in a match, to do training that's specific to playing. Obviously when you're on the court, that's good, but when you're doing speed work on the court, it's not always that easy to know how long to run for, so we just went down that route of following the statistics. It's a tough session.

"This afternoon we did a 6-3 set, the average game of that match was seven points, so we do seven points then take a minute's break between games."

The technical training with Ivan Lendl is almost a respite, with Murray able to concentrate on specific aspects of his game. The teenager who hated to train has now become a champion who is inured to it. The November sessions are demanding and the fitness regime has aspects that continue day to day, but Murray has seen the impact it has made on his fortunes.

"He commits to it every day," says Jamie Baker, the Scottish tennis player who has known Murray since they were both six and who accompanied his friend on the Miami training block.

"His tolerance of the pain of sessions has grown and he throws his whole body into it every day." Baker points out that the theory of marginal gains has a huge impact at the very top level. Andy is at the sharp end. Basically, he is at a level where, say, a 1% improvement in any area would pay out a big dividend. If he gets 1% better in one aspect it could turn a loss into a win. It is that fine a margin among the top guys."

Baker, a player whose career has been blighted by injury, is routinely commended for an outstanding work ethic, but he says: "I love training and I have always bought into it, but Andy's tolerance is now highly impressive.

"He's been doing this level of training for six years now. That is one hell of an investment. Frankly, he is a role model in professionalism, in that idea that you must step up every day to step forward."

This all fuelled by an inner drive and a diet that contains a lot of fish, usually sushi, some rice, chicken and steak, and a little pasta. The pizza is off the menu, except for one moment of crisis.

Murrayball: How to gatecrash the golden era is available now at the Kindle Store priced £2.99.