Most of the time, there's only one correct answer: by the value they deliver.
For years companies have tried to measure developers using all sort of hard metrics, like the number of lines of code they typed, or the bugs they fixed, or the bugs they introduced, or how early they finished. It doesn't matter how you try to slice it, every one of these metrics can (and will) be manipulated, which makes them useless.
Developers produce intellectual property. They don't have an algorithmic job where you can easily predict the path and outputs given a set of inputs. This makes it very hard to measure their job, so you need to step back and look at the big picture.
(How do you measure the performance of a musician that's writing a song, or a painter working on a mural, or a novel writer? In all these cases the only thing that matters is the final result.)
So the key is defining what "value" means for your project, and make sure whatever it is; it gradually tends to increase. (Scrum teams use "velocity" for this, in which case you add all your individuals into one single number to measure their performance.)