Coder Social home page Coder Social logo

dns-benchmark's Introduction

DNS Benchmark Tool

This is a simple command-line DNS benchmark tool written in Python. It allows you to measure and compare the performance of different DNS servers for a given domain.

I used it to figure out which DNS server to use on my local network.

Features

  • Benchmark multiple DNS servers simultaneously
  • Measure average, minimum, and maximum query times
  • Easy to use command-line interface
  • Works on macOS (and other Unix-like systems)

Requirements

  • Python 3.6+
  • dnspython library

Installation

  1. Clone this repository:

    git clone https://github.com/esurdam/dns-benchmark.git
    cd dns-benchmark
    
  2. Install the required Python library:

    pip3 install dnspython
    
  3. Make the script executable:

    chmod +x dns_benchmark.py
    

Usage

Run the script from the command line with the following syntax:

./dns_benchmark.py <domain> <dns_server1> [dns_server2] ...

For example:

./dns_benchmark.py example.com 8.8.8.8 1.1.1.1 9.9.9.9

This will benchmark the DNS servers 8.8.8.8 (Google), 1.1.1.1 (Cloudflare), and 9.9.9.9 (Quad9) for the domain example.com.

Output

The script will output the average, minimum, and maximum query times for each DNS server. For example:

DNS Benchmark Results:
----------------------
8.8.8.8: Avg: 0.0534s, Min: 0.0412s, Max: 0.0701s
1.1.1.1: Avg: 0.0234s, Min: 0.0189s, Max: 0.0312s
9.9.9.9: Avg: 0.0634s, Min: 0.0534s, Max: 0.0823s

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source and available under the MIT License.

dns-benchmark's People

Contributors

esurdam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.