pinggraph

Version, currently main branch1 version
  • main branchlatestNov 28, 2025

github.com/aloneiso/pinggraph

No description declared in shard.yml.

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  pinggraph:
    github: aloneiso/pinggraph
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.0.0
License
MIT
Author
rishi
Target
  • pinggraph from src/pinggraph.cr

Dependencies

This version declares no dependencies.

README

PingGraph

Setup for Personal Use

Install Crystal

Windows:

  1. Download Crystal from the official installer: https://crystal-lang.org/install
  2. Install and ensure the installer adds Crystal to PATH.

Linux (Debian/Ubuntu):

curl -fsSL https://crystal-lang.org/install.sh | sudo bash
sudo apt install crystal

macOS:

brew install crystal

Run the program

  1. Navigate to the folder:
cd pinggraph
  1. Run directly without building:
crystal run src/pinggraph.cr -- --host google.com --interval 1
  1. Or build a fast executable:
crystal build src/pinggraph.cr --release

Executable will be created in the same folder.

PingGraph is a minimal command-line latency visualizer written in Crystal. It pings a target host at a fixed interval and renders the latency as a clean ASCII bar graph.

34ms     ||||||
52ms     ||||||||||||||
108ms    |||||||||||||||||||||||||||
timeout
44ms     |||||||||

Features

  • Cross-platform: Windows, Linux, macOS
  • Automatic ping output parsing
  • ASCII bar scaling based on latency
  • Adjustable interval
  • Optional fixed duration
  • Optional single-ping mode

Usage

pinggraph [options]

Options

--host HOST          Host to ping (default: google.com)
--interval SECONDS   Seconds between pings (default: 1)
--duration SECONDS   Total runtime
--once               Run a single ping and exit

Examples

Ping Google every second:

pinggraph --host google.com --interval 1

Run for 30 seconds:

pinggraph --duration 30

Single ping:

pinggraph --once