Using dnsperftest
Dnsperftest is a Shell script to test the performance of the most popular DNS resolvers from your location.
First install dc and dig.
$ sudo apt-get install bc dnsutils
Usage
$ git clone --depth=1 https://github.com/cleanbrowsing/dnsperftest/
$ cd dnsperftest
$ bash ./dnstest.sh