What is a good way to measure productivity?
It can be a metric, but it doesn't indicate productivity by itself. It's hard to use even correlated to other metrics, but loses its value if compared out of context and without knowing the code quality
Ofcourse noone an help you if you are trying to cheat your own system.