Skip to content

piyushdev04/devprobe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devprobe⚡

devprobe is a fast, developer-friendly CLI tool to probe, measure, and load test HTTP services.

It helps you understand where time is spent — DNS, TCP, TLS, HTTP — and how your service behaves under load.


Features

Network Probing

  • DNS lookup time
  • TCP connection time
  • TLS handshake time
  • HTTP request latency & status
  • Automatic retries
  • Request timeouts

Load Testing

  • Configurable concurrency
  • Total request count
  • Success & error counts
  • Average latency
  • P95 latency

Installation

Build from source

git clone https://github.com/piyushdev04/devprobe.git

cd devprobe

go build -o devprobe ./cmd

./devprobe -tui -timeout 3s -retries 2 -c 20 -n 100 https://example.com

How it works

  1. Input Parsing
  • Reads the target URL and optional flags: concurrency, total requests, timeout, retries.
  1. Context Creation
  • Creates a context.Context with a timeout to control the maximum duration of each probe or request.
  1. Concurrent Probes
  • Launches goroutines for each probe:
    • DNS lookup
    • TCP connection
    • TLS handshake
    • HTTP request
  • Each probe runs concurrently and independently.
  1. Retries
  • Each probe uses a retry mechanism.
  • On failure, it automatically retries up to the configured number of attempts.
  1. Time Measurement
  • Each probe measures elapsed time using a utility function:
    • DNS → time to resolve hostname
    • TCP → time to establish connection
    • TLS → time to complete handshake
    • HTTP → time to receive full response
  1. Result Collection
  • All probe results are sent through a channel.
  • Main routine collects and sorts them by execution order for logical output.
  1. Load Testing
  • Spawns a worker pool with size = concurrency.
  • Sends total requests to the target URL in parallel.
  • Measures latencies, counts successes, and errors.
  1. Metrics Computation
  • After load test completes:
    • Average latency = sum of latencies ÷ total requests
    • P95 latency = 95th percentile from sorted latency list
    • Success / Error counts are calculated
  1. Output
  • Probe times, load test stats, and derived metrics are returned for display or further processing. alt text

devprobe Cheat Sheet

  1. Basic probe
./devprobe https://example.com
  1. Load test with concurrency & total requests
./devprobe -c 20 -n 100 https://example.com
  1. Set timeout per request
./devprobe -timeout 3s https://example.com
  1. Retry on failure
./devprobe -retries 2 https://example.com
  1. Combine concurrency, load, timeout, retries
./devprobe -c 20 -n 100 -timeout 3s -retries 2 https://example.com
  1. Interactive TUI (Terminal UI)
./devprobe -tui https://example.com
  1. TUI + load test + timeout + retries
./devprobe -tui -c 20 -n 100 -timeout 3s -retries 2 https://example.com

THANKS FOR READING!!!❄️

About

a Go CLI to inspect DNS, TCP, TLS, HTTP latency and load test services.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages