Coder Social home page Coder Social logo

go-dnsperf's Introduction

go-dnsperf

A tool similar to dnsperf but written in golang, with extra support of subnet option.

Build

env GOOS=linux GOARCH=amd64 go build

Usage

The usage and output are intended to keep consistent with dnsperf:

Usage: gatling [-m mode] [-s server_addr] [-p port] [-d datafile]
               [-c clients] [-n maxruns] [-l timelimit] [-t timeout]
               [-Q max_qps] [-h]
    -Q limit the number of queries per second
    -c the number of clients to act as
    -d the input data file
    -h print help
    -l run for at most this many seconds
    -m set transport mode: udp, tcp (default: udp)
    -n run through the input at most N times
    -p the port on which to query the server (default: udp/tcp 53)
    -s the server to query (default: 127.0.0.1)
    -t the timeout for query completion in seconds (default: 5)

and the output could be like:

Statistics:

 Queries sent:         30
 Queries completed:    30 (100.00%)
 Queries lost:         0 (0.00%)

 Response codes:    NOERROR 30 (100.00%)
 Average packet size: request 54, response 149
 Run time (s):         0.578596
 Query per second:     0.000000
 Average Latency (s):  0.000000 (min 0.001072, max 0.023456)
 Latency StdDev (s):   0.007992

dataFile

The data file should be in format of Domain QueryType [subnet], for example:

example.com AAAA
www.baidu.com A 1.1.1.1

Benchmark

The QPS of single thread(-c 1) could reach 10K; And the MaxQPS could reach 100K with 12 concurrent threads, but it could differ with different CPU resource.

go-dnsperf's People

Contributors

hdw868 avatar

Stargazers

 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.