Skip to content

shenning00/pinggraph

Repository files navigation

PingGraph

A real-time network monitoring application for macOS that provides comprehensive visual analysis of network connectivity through continuous ICMP ping operations.

PingGraph Main Interface

Overview

PingGraph delivers enterprise-level network monitoring with millisecond precision timing, intelligent performance optimization, and advanced visualization capabilities. Monitor up to 8 concurrent network targets with hardware-accelerated charts maintaining smooth 60fps performance even with large datasets.

Key Features

  • Real-time Network Monitoring: Continuous ICMP ping operations with millisecond precision
  • Multi-target Support: Monitor up to 8 network targets simultaneously
  • Advanced Visualization: Hardware-accelerated charts with intelligent performance optimization
  • Comprehensive Statistics: Detailed analysis including packet loss, jitter, and quality metrics
  • Smart Data Management: Three-tier storage system with automatic compression
  • Export Capabilities: Multiple formats (CSV, JSON, XML) with flexible data selection
  • Native macOS Interface: SwiftUI-based with dark theme and keyboard shortcuts

Quick Start

Prerequisites

  • macOS 13.0 or later
  • Xcode 15.0+ (for building from source)
  • Administrator privileges (required for ICMP operations)

Download and Build

  1. Clone the repository:

    git clone https://github.com/yourusername/pinggraph.git
    cd pinggraph
  2. Open in Xcode:

    open pinggraph.xcodeproj
  3. Build and run:

    • Select "pinggraph" scheme
    • Press ⌘+R to build and run
    • Grant ICMP privileges when prompted

Running the Application

  1. Add a target: Enter an IP address or hostname (e.g., 8.8.8.8 or google.com)
  2. Start monitoring: Click "Start" or press ⌘+R
  3. View real-time data: Watch live charts showing response times and packet loss
  4. Manage multiple targets: Use ⌘+T to create new tabs
  5. Export data: Use ⌘+E to export in various formats

Architecture

Core Components

  • Multi-tab Interface: Up to 8 concurrent ping operations
  • ICMP Network Engine: Raw socket implementation with privilege handling
  • Three-tier Data Storage: Hot cache → Compact buffer → Compressed storage
  • Performance Optimization: 4-tier adaptive rendering system
  • Statistics Engine: Real-time network quality metrics

Performance Features

  • Memory Efficient: 87% memory reduction through optimized data structures
  • Hardware Accelerated: Metal-backed rendering for smooth performance
  • Intelligent Sampling: Smart data reduction for large datasets
  • Adaptive Optimization: Automatic performance tuning

Configuration

Application Preferences

Access via ⌘+,:

  • Ping Interval: 0.1 to 10 seconds
  • Timeout Duration: 1 to 30 seconds
  • Data Retention: 10 minutes to 24 hours
  • Performance Optimization: None/Light/Medium/Aggressive

Per-Tab Configuration

  • Target: IP address or hostname
  • Custom Intervals: Override global settings
  • IPv6 Support: Enable IPv6 connectivity testing

Keyboard Shortcuts

Global Controls

  • ⌘+T: New tab
  • ⌘+W: Close tab
  • ⌘+D: Duplicate tab
  • ⌘+,: Preferences

Monitoring Controls

  • ⌘+R: Start/Resume monitoring
  • ⌘+S: Stop monitoring
  • ⌘+Shift+R: Start all tabs

Export and Analysis

  • ⌘+E: Export current tab
  • ⌘+Shift+E: Export all tabs
  • ⌘+I: Performance dashboard

Export Formats

Supported Formats

  • CSV: Comma-separated values for spreadsheet analysis
  • JSON: Structured data for programmatic processing
  • XML: Hierarchical format for enterprise integration

Export Scopes

  • Current Tab: Active monitoring session
  • All Tabs: All monitoring sessions
  • Date Range: Custom time windows
  • Selected Data: Custom field selection

Troubleshooting

Common Issues

ICMP Permission Denied:

# Run with elevated privileges
sudo open /Applications/PingGraph.app

# Or configure in System Preferences:
# System Preferences > Security & Privacy > Privacy > Network

High Memory Usage:

  • Reduce data retention period
  • Enable aggressive optimization mode
  • Close unused tabs

Poor Performance:

  • Enable automatic optimization
  • Reduce visible time range
  • Lower ping frequency for long-term monitoring

Development

Building from Source

# Clone and setup
git clone https://github.com/yourusername/pinggraph.git
cd pinggraph

# Open in Xcode
open pinggraph.xcodeproj

# Run tests
xcodebuild test -project pinggraph.xcodeproj -scheme pinggraph

# Build for release
xcodebuild archive -project pinggraph.xcodeproj -scheme pinggraph

Project Structure

pinggraph/
├── Sources/
│   ├── App/                     # Application entry point
│   ├── UI/                      # User interface components
│   ├── Core/                    # Core business logic
│   ├── Networking/              # Network operations
│   ├── Optimization/            # Performance optimization
│   ├── Storage/                 # Data management
│   └── Models/                  # Data structures
├── Tests/                       # Unit and integration tests
├── docs/                        # Documentation
└── design/                      # Design specifications

Dependencies

  • Swift Collections: Advanced data structures
  • SwiftUI Charts: Native charting framework
  • Network Framework: Modern networking APIs

Performance Targets

  • Memory: <100MB with 8 active targets
  • CPU: <20% utilization during normal operation
  • Rendering: 60fps charts with 1000+ data points
  • Accuracy: ±1ms compared to system ping

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow Swift API Design Guidelines
  • Maintain test coverage above 85%
  • Include performance impact analysis
  • Update documentation for new features

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

  • Documentation: Check the docs/ directory
  • Issues: Report bugs via GitHub Issues
  • Discussions: Community support and feature requests

PingGraph - Ping Network Monitoring for macOS

About

A MacOS graphical ping client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages