Skip to content

Commit db2477e

Browse files
authored
Merge pull request #25 from frankovo/release/0.3.0
feat(cli): full test coverage and readme refactor
2 parents d802150 + 0e9621e commit db2477e

File tree

5 files changed

+499
-22
lines changed

5 files changed

+499
-22
lines changed

README-pypi.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ dns-benchmark benchmark --use-defaults
1515

1616
> 🎉 **1,400+ downloads this week!** Thank you to our growing community.
1717
18+
**Real Time Tracking**
19+
20+
![Real Time Tracking](https://raw.githubusercontent.com/frankovo/dns-benchmark-tool/main/docs/real_time_tracking.gif)
21+
*Watch DNS queries in motion*
22+
1823
</div>
1924

25+
---
26+
2027
## 🎉 Today’s Release Highlights ![new](https://img.shields.io/pypi/v/dns-benchmark-tool.svg?color=brightgreen&label=new)
2128

2229
We’ve added **three powerful CLI commands** to make DNS benchmarking even more versatile:
@@ -27,7 +34,7 @@ We’ve added **three powerful CLI commands** to make DNS benchmarking even more
2734

2835
```bash
2936
# Quick resolver ranking
30-
dns-benchmark top --use-defaults
37+
dns-benchmark top
3138

3239
# Compare resolvers side-by-side
3340
dns-benchmark compare Cloudflare Google Quad9 --show-details
@@ -37,16 +44,14 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
3744
--alert-latency 150 --alert-failure-rate 5 --output monitor.log
3845
```
3946

40-
---
41-
4247
[![CI Tests](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/test.yml/badge.svg)](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/test.yml)
4348
[![Publish to TestPyPI](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/testpypi.yml/badge.svg)](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/testpypi.yml)
4449
[![Publish to PyPI](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/pypi.yml/badge.svg)](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/pypi.yml)
4550
[![PyPI version](https://img.shields.io/pypi/v/dns-benchmark-tool.svg?color=brightgreen)](https://pypi.org/project/dns-benchmark-tool/)
4651

4752
![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)
4853
![License](https://img.shields.io/badge/license-MIT-green.svg)
49-
![Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)
54+
![Coverage](https://img.shields.io/badge/coverage-87%25-brightgreen.svg)
5055

5156
[![Downloads](https://img.shields.io/pypi/dm/dns-benchmark-tool.svg?color=blueviolet)](https://pypi.org/project/dns-benchmark-tool/)
5257
[![GitHub stars](https://img.shields.io/github/stars/frankovo/dns-benchmark-tool.svg?style=social&label=Star)](https://github.com/frankovo/dns-benchmark-tool/stargazers)
@@ -97,7 +102,6 @@ DNS resolution can add 300ms+ to every request. This tool helps you find the fas
97102

98103
✅ Multiple formats supported: CSV, Excel, PDF, JSON.
99104
✅ Visual reports with charts and graphs in PDF/Excel.
100-
✅ Domain statistics via `--domain-stats` for per-domain analysis.
101105
✅ Record type statistics (`--record-type-stats`) compare A, AAAA, MX, etc.
102106
✅ Error breakdown (`--error-breakdown`) highlights problematic resolvers.
103107

@@ -120,6 +124,10 @@ DNS resolution can add 300ms+ to every request. This tool helps you find the fas
120124

121125
```bash
122126
pip install dns-benchmark-tool
127+
128+
#Verify Installation
129+
dns-benchmark --version
130+
dns-benchmark --help
123131
```
124132

125133
## Quick usage
@@ -315,7 +323,7 @@ Quickly rank resolvers by speed and reliability.
315323

316324
```bash
317325
# Rank resolvers quickly
318-
dns-benchmark top --use-defaults
326+
dns-benchmark top
319327

320328
# Use custom domain list
321329
dns-benchmark top -d domains.txt
@@ -368,7 +376,7 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
368376

369377
| Command | Purpose | Typical Use Case | Key Options | Output |
370378
|--------------|---------|------------------|-------------|--------|
371-
| **top** | Quick ranking of resolvers by speed and reliability | Fast check to see which resolver is best right now | `--domains`, `--record-types`, `--iterations`, `--output` | Sorted list of resolvers with latency & success rate |
379+
| **top** | Quick ranking of resolvers by speed and reliability | Fast check to see which resolver is best right now | `--domains`, `--record-types`, `--output` | Sorted list of resolvers with latency & success rate |
372380
| **compare** | Side‑by‑side comparison of specific resolvers | Detailed benchmarking across chosen resolvers/domains | `--domains`, `--record-types`, `--iterations`, `--output`, `--show-details` | Table of resolvers with latency, success rate, per‑domain breakdown |
373381
| **monitoring** | Continuous monitoring with alerts | Real‑time tracking of resolver performance over time | `--interval`, `--duration`, `--alert-latency`, `--alert-failure-rate`, `--output`, `--use-defaults` | Live status indicators, alerts, optional log file |
374382

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,26 @@ dns-benchmark benchmark --use-defaults
1515
> 🎉 **1,400+ downloads this week!** Thank you to our growing community.
1616
> 📢 **Want multi-region testing?** [Join the waitlist →](https://buildtools.net)
1717
18+
**Real Time Tracking**
19+
20+
[![Real Time Tracking](docs/real_time_tracking.gif)](https://github.com/frankovo/dns-benchmark-tool)
21+
*Watch DNS queries in motion*
22+
23+
</div>
24+
1825
## 🎉 Today’s Release Highlights ![new](https://img.shields.io/pypi/v/dns-benchmark-tool.svg?color=brightgreen&label=new)
1926

2027
We’ve added **three powerful CLI commands** to make DNS benchmarking even more versatile:
2128

2229
- 🚀 **top** — quick ranking of resolvers by speed and reliability
30+
2331
- 📊 **compare** — side‑by‑side benchmarking with detailed statistics and export options
32+
2433
- 🔄 **monitoring** — continuous performance tracking with alerts and logging
2534

2635
```bash
2736
# Quick resolver ranking
28-
dns-benchmark top --use-defaults
37+
dns-benchmark top
2938

3039
# Compare resolvers side-by-side
3140
dns-benchmark compare Cloudflare Google Quad9 --show-details
@@ -35,8 +44,6 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
3544
--alert-latency 150 --alert-failure-rate 5 --output monitor.log
3645
```
3746

38-
</div>
39-
4047
---
4148
[![CI Tests](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/test.yml/badge.svg)](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/test.yml)
4249
[![Publish to TestPyPI](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/testpypi.yml/badge.svg)](https://github.com/frankovo/dns-benchmark-tool/actions/workflows/testpypi.yml)
@@ -45,7 +52,7 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
4552

4653
![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)
4754
![License](https://img.shields.io/badge/license-MIT-green.svg)
48-
![Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)
55+
![Coverage](https://img.shields.io/badge/coverage-87%25-brightgreen.svg)
4956

5057
[![Downloads](https://img.shields.io/pypi/dm/dns-benchmark-tool.svg?color=blueviolet)](https://pypi.org/project/dns-benchmark-tool/)
5158
[![GitHub stars](https://img.shields.io/github/stars/frankovo/dns-benchmark-tool.svg?style=social&label=Star)](https://github.com/frankovo/dns-benchmark-tool/stargazers)
@@ -94,7 +101,7 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
94101
- [Feedback](#feedback)
95102
- [Risolver management](#risolver-management)
96103
- [Domain management](#domain-management)
97-
- [Category overview](#category-overview)
104+
- [Category overview](#category-overview)
98105
- [Configuration management](#configuration-management)
99106
- [Complete usage guide](#complete-usage-guide)
100107
- [Quick performance test](#quick-performance-test)
@@ -108,10 +115,10 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
108115
- [⚡ CLI Commands](#-cli-commands)
109116
- [🚀 Top](#-top)
110117
- [📊 Compare](#-compare)
111-
- [🔄 Monitoring](#-monitoring)
118+
- [🔄 Monitoring](#-monitoring)
112119
- [🌟 Command Showcase](#-command-showcase)
113-
- [📊 Analysis Enhancements](#-analysis-enhancements)
114-
- [⚡ Best Practices](#-best-practices)
120+
- [📊 Analysis Enhancements](#-analysis-enhancements)
121+
- [⚡ Best Practices](#-best-practices)
115122
- [Feedback \& Community Input](#feedback--community-input)
116123
- [Feedback Command](#feedback-command)
117124
- [Smart Feedback Prompts](#smart-feedback-prompts)
@@ -797,7 +804,7 @@ dns-benchmark list-domains --format csv
797804
dns-benchmark list-domains --format json
798805
```
799806

800-
#### Category overview
807+
### Category overview
801808

802809
```bash
803810
# View all available categories
@@ -973,11 +980,12 @@ dns-benchmark benchmark \
973980
The DNS Benchmark Tool now includes three specialized commands for different workflows:
974981

975982
### 🚀 Top
983+
976984
Quickly rank resolvers by speed and reliability.
977985

978986
```bash
979987
# Rank resolvers quickly
980-
dns-benchmark top --use-defaults
988+
dns-benchmark top
981989

982990
# Use custom domain list
983991
dns-benchmark top -d domains.txt
@@ -989,6 +997,7 @@ dns-benchmark top -o results.json
989997
---
990998

991999
### 📊 Compare
1000+
9921001
Benchmark resolvers side‑by‑side with detailed statistics.
9931002

9941003
```bash
@@ -1007,7 +1016,7 @@ dns-benchmark compare Cloudflare Google -o results.csv
10071016

10081017
---
10091018

1010-
## 🔄 Monitoring
1019+
### 🔄 Monitoring
10111020

10121021
Continuously monitor resolver performance with alerts.
10131022

@@ -1029,13 +1038,13 @@ dns-benchmark monitoring --use-defaults --interval 30 --duration 3600 \
10291038

10301039
| Command | Purpose | Typical Use Case | Key Options | Output |
10311040
|--------------|---------|------------------|-------------|--------|
1032-
| **top** | Quick ranking of resolvers by speed and reliability | Fast check to see which resolver is best right now | `--domains`, `--record-types`, `--iterations`, `--output` | Sorted list of resolvers with latency & success rate |
1041+
| **top** | Quick ranking of resolvers by speed and reliability | Fast check to see which resolver is best right now | `--domains`, `--record-types`, `--output` | Sorted list of resolvers with latency & success rate |
10331042
| **compare** | Side‑by‑side comparison of specific resolvers | Detailed benchmarking across chosen resolvers/domains | `--domains`, `--record-types`, `--iterations`, `--output`, `--show-details` | Table of resolvers with latency, success rate, per‑domain breakdown |
10341043
| **monitoring** | Continuous monitoring with alerts | Real‑time tracking of resolver performance over time | `--interval`, `--duration`, `--alert-latency`, `--alert-failure-rate`, `--output`, `--use-defaults` | Live status indicators, alerts, optional log file |
10351044

10361045
---
10371046

1038-
### 📊 Analysis Enhancements
1047+
## 📊 Analysis Enhancements
10391048

10401049
- **Iteration count**: displayed when more than one iteration is run.
10411050
- **Cache hits**: shows how many queries were served from cache (when `--use-cache` is enabled).
@@ -1058,7 +1067,7 @@ Iterations: 3
10581067
Cache hits: 40 (26.7%)
10591068
```
10601069

1061-
### ⚡ Best Practices
1070+
## ⚡ Best Practices
10621071

10631072
| Mode | Recommended Flags | Purpose |
10641073
|-----------------|------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
@@ -1372,6 +1381,9 @@ Place images in `docs/screenshots/`:
13721381
- `docs/screenshots/cli_run.png`
13731382
- `docs/screenshots/excel_report.png`
13741383
- `docs/screenshots/pdf_summary.png`
1384+
- `docs/screenshots/pdf_charts.png`
1385+
- `docs/screenshots/excel_charts.png`
1386+
- `docs/screenshots/real_time_monitoring.png`
13751387

13761388
### 1. CLI Benchmark Run
13771389

docs/real_time_tracking.gif

17.9 MB
Loading

src/dns_benchmark/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def _progress_cb(completed: int, total: int) -> None:
764764
for name, stats in resolver_stats.items():
765765
if metric == "latency":
766766
if stats.successful_queries > 0 and stats.avg_latency is not None:
767-
score = stats.avg_latency
767+
score = -stats.avg_latency
768768
else:
769769
score = float("-inf") # push failed resolvers to bottom
770770

0 commit comments

Comments
 (0)