I have an easel densitometer that I use in conjunction with an adjustable light source separate from the enlarger to "while" flash. When I have determined the readings on the easel densitometer for the white and black thresholds for a given exposure time, I adjust the enlarger diaphragm for the shadows and the separate source for the highlight. Both lights are controlled by the enlarger switch, so both are on during the printing exposure, which is why I call it "while" flashing.

A rather simple light meter should do the trick.