Add benchmark function for router.