Added stats recording for dht and dhttest