>But if I count that metric for the same developer, or the same team, I can certainly spot changes in productivity
I can't imagine this working in any scenario. Even different tasks within the same project on the same day will involve enormously different amounts of coding, testing, and analysis.