Method to determine latency
Test latency and log errors