First, why?
Second, it's pretty much impossible. Even if your enemy doesn't attack (which will hardly ever happen), there are dozens of variables.
- There are many different ways to eco, some more efficient than others.
- Are you going for air? You'll be ecoing more into power than mass
- How much economy are you spending on troops?
- How much reclaim are you getting?
- What's the engineer walk time between mex upgrades?
- Are you getting anything from ally overflow?
And countless more. If you could keep track of and predict all that you're looking at an AI that could play much better than any human player.