bugfix: make sure histogram metric path is correct

also slight optimisation in the metric setting loop for timers