If you run below a threshold (depends on your strenght and current fitness level) the mechanics of energy production is principally aerobic. Above this threshold the anaerobic mechanism become more and more important.
Therefore it is important to measure the current value for the Anaerobic Threshold (AT, in Italian SAN).
In the past an Italian physiologist (F. Conconi, see, for example https://www.ncbi.nlm.nih.gov/pubmed/7085420) has proposed a "non-invasive" test to measure the threshold, that is called "The Conconi Test".
Belove the threshold the heart rate increase linearly with speed. After the threshold increasing the speed the heart rate increase with a lower rate and finally it reaches a maximum.
In this test, you run at a progressively increasing speed (10, 10.5, 11... km/h) and you measure the corresponding heart rate.
In this way you can measure the threshold.
I have developed a small Jupiter Notebook (http://jupyter.org/), using Python, SKLEARN and Ordinary Least Square Method to analyze the data from one recent test, to assess my linear region and my anaerobic threshold.
I have also compared the data with another test, run on a treadmill and it confirmed that, at least for me, it is much easier to run on a treadmill.
The code is in one of my github repositories: