惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
T
ThreatConnect
J
Java Code Geeks
博客园 - 司徒正美
A
Arctic Wolf
T
True Tiger Recordings
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future
P
Palo Alto Networks Blog
The Hacker News
The Hacker News
The Register - Security
The Register - Security
S
Securelist
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
I
Intezer
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
K
Kaspersky official blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
V
V2EX
小众软件
小众软件
F
Fox-IT International blog
Martin Fowler
Martin Fowler
Apple Machine Learning Research
Apple Machine Learning Research
T
Tenable Blog
F
Future of Privacy Forum
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
T
Threatpost
I
InfoQ
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Tor Project blog
G
GRAHAM CLULEY
D
DataBreaches.Net

Hacker News: Show HN

GitHub - bitomule/musts: The validation loop that stops AI coding agents from claiming work is done before it actually is. Feynman - AI research assistant SynapCores — the AI-native database GitHub - erikshelley/complete-family-tree-viewer: A webpage for viewing all of a person's family tree at once GitHub - Noumenon-ai/AutoMaxFix: Controlled AI repair loop. Audit → Reproduce → Patch → Test → Report. Safety boundaries most AI agents skip. GitHub - JosephRedfern/plonk: Python interpreter at your fingertips Open Satchel — A free local-first PDF editor. Show HN: Hackobar – One feed for AI news GitHub - ghostchat-dev/widget: ~10KB chat widget. Zero cookies. Zero tracking. Fully open source. tiltbump X posts as clean Markdown for LLMs Symbol Combos — Cute Symbols, Kaomoji & Aesthetic Emojis to Copy GitHub - SellswordSoftware/justbookmarks: A simple desktop bookmark manager that uses the Netscape Bookmark HTML format so you can keep one browser-independent source of truth. SailWP. WordPress without the weight. Show HN: Widget Cast – Video Widgets for iOS PhoneDiffusion App - App Store Show HN: NanoApps: Run custom homebrew apps on iPod nano 7th generation Breadboard Knockout GitHub - elixir-volt/volt: Elixir-native frontend build tool — dev server, HMR, and production builds for JavaScript, TypeScript, Vue SFCs, and CSS. No Node.js required. Show HN: GuideOS – A radar-first, off-grid navigation kernel for edge robotics State lives on disk, not in chat Show HN: My biggest solo-project: Game engine with its own programming language MarketChacha | Stock Trading Community for Real Market Discussion GitHub - dmitryAQA/playwright-bdr-template Kubernetes, explained — interactive walkthroughs Show HN: Proj – organize your coding projects with categories and one-key CD Show HN: I made a compiler/VM for untrusted scripts Show HN: Stumpy – StumbleUpon Re-Created Show HN: Reward Is Not Reinforcement Until Admitted GitHub - dominikhei/cardamon: Cardamon is a cleanup tool for Prometheus that collects unused metrics from Grafana and Prometheus and generates drop statements for them. GitHub - NavodPeiris/grizzlars: High-performance DataFrame library written in C++ with Python bindings. Peakedin - LinkedIn's finest moments, curated weekly Planetensuche GitHub - cnemri/awesome-gemini-omni: A curated list of awesome Google Gemini Omni prompt guides, interactive platforms, and creative showcases. Show HN: An open-source, interactive AI engineering syllabus (1,100 papers) Show HN: I Built a Debugging Challenge for the AI Coding Age HTML Deployer: 1-Click AI Code To Website Publisher - Chrome 应用商店 GitHub - alkait/WhatsKept: Searchable, agent-queryable WhatsApp history from an iOS backup — a single Go binary. Geomatic | Tiny Volt Show HN: SenseCollect – Web data extraction made simple GitHub - feers77/iasql: A new implementation of SQL for IA purposes, using postgresSQL and Karpathy wiki-llm as inspiration. Kubernetes Study Path — From kubectl to a Production Cluster GitHub - octelium/cordium: Open-source sandbox platform with identity-based secretless infrastructure access for developers and AI agents on Kubernetes Play Doom with friends in your browser. You decide when you receive ForwardPass! (experimental) GitHub - jacksonsolid/Bytery fx.leftium.com GitHub - skorotkiewicz/cadence: $$hi Small marker tracking for source files. GitHub - nikitph/yieldos Show HN: Live AI music sequencing agent SaveNeighbor | Local help from people you trust drea: podcast ad blocker App - App Store JS Crossword GitHub - jake-stewart/tuie: A rich, performant TUI library for Rust. GitHub - AlexWasHeree/NoteCast: Local note engine that uses LLM to build and evolve a knowledge graph stocks.sjer.red — long PC parts RocketGraph — Never look at logs again Show HN: Replacing a 3.4MB video with 40kb of GSAP Show HN: Lightweight, OpenSource, zero-dependency App tour & user onboarding SDK Treasury — Personal Finance App | AI Insights & Budgeting Show HN: MailMark – Cold email tool where you own your domain and mailboxes Voxxy: Voice to Text for your Mac Menu Bar Show HN: I built a TikTok style video debate app GitHub - acatovic/ai-game-studio: AI generation of 2d game assets such as spritesheets Assemblr GitHub - AlexMason/worldnotes: Extensible inline-markdown editor with wiki-style navigation Show HN: Brew-browser – A native macOS GUI for Homebrew GitHub - aloth/cred-1: CRED-1: An Open Multi-Signal Domain Credibility Dataset (2,672 domains) Show HN: TalkTimer, a micro-SaaS run by an AI agent team Trickster's Table invest-like - AI value-investing: best-tier consensus beat S&P 500 by +72.7% GitHub - kimjune01/swebench-verified: Reproducible recon/craft/audit agent pipeline for SWE-bench Verified. Official-graded, codex-attested, GPL-3.0. Run it yourself. GitHub - mupt-ai/context-drop: cli tool to make sharing context between remote agents dead easy Multiple Real Desktops for Windows GitHub - lionello/han64: Handling Chinese text on the Commodore 64 Show HN: Strudel – Generate commit messages via Apple's on-device LLM Show HN: Audiomass – a free, open-source multitrack audio editor for the web move-reminder The Front Page HtmlUnit – Welcome to HtmlUnit GitHub - kouhxp/textsnap: Snap any image, screenshot, or webpage into plaintext. No GPU. No cloud. One command. Show HN: Pro Health Ledger – An open-source, net-neutral reputation system iPhone 版“Today” - App Store LLMRequirements.com — Hardware for Local LLMs Show HN: Hookwarden – npx tool to find and fix webhook HMAC bugs (JS/TS/Py/PHP) Frello — A small revolt against bloated software Career tools for data professionals | Datamata Studios Show HN: Kanban CLI (A local-first, agent-first task manager for the terminal) Show HN: Fleet – Python supervisor for running coding agents in parallel TravElly | A travel diary app for kids TapToyPia Show HN:An LED display app that lights up concerts, events, and fan moments Show HN: Logo Fonts Home | Qavvāli Wiki Show HN: Panorama – Review Code, Faster Show HN: Slow Code, a monthly meetup to practice coding by hand GitHub - abakh/nbsdgames: A package of 21 new, improved, text-based modern games. Some are entirely original ideas. Best and lightest! Let's Jam Show HN: CurRant->Screw Google scourge, help people notice what is worth a look
GitHub - xfoa/Impatience: A library for instrumentation of event-to-event latency over a network
foax · 2026-05-26 · via Hacker News: Show HN

A Rust library for measuring event-to-event latency across networked peers with automatic clock synchronisation.

The library is I/O-agnostic: it has zero dependencies on std::net or threading. Bring your own UDP socket and event loop. Two example CLI programs (sync-test and latency-demo) are included to demonstrate real-world usage.

Features

  • Four abstraction levels from high-level instrumentation down to the raw synchronisation algorithm
  • UDP-based clock sync using a windowed-minimum one-way-delay estimator with 24-bit truncated timestamps
  • Zero-copy serialisation of packet types via rkyv
  • Non-blocking handshake (Initiator / Responder) for establishing peer clocks
  • no_std support at the timesync algorithm layer
  • Optional features: serde, uncertainty, svg (see below)

Quick Start

use impatience::clocks::PeerClock;
use impatience::instrumentation::Profiler;
use impatience::time;

let clock = PeerClock::new();
clock.start(time::now_usec());
let profiler = Profiler::new(clock.clone());

let mut span = profiler.start("input-to-print", clock.local_ms());
let remote_finish_ms = clock.local_ms() + 50;

if let Some(latency_ms) = profiler.finish_remote(&mut span, remote_finish_ms) {
    println!("Latency: {} ms", latency_ms);
}

For a complete networked example with handshake and sync scheduling, see the crate-level documentation (cargo doc --open).

CLI Tools

impatience ships with two example programs.

sync-test

Debug clock synchronisation between two machines over UDP.

# Server
impatience sync-test --server 0.0.0.0 --port 7340

# Client
impatience sync-test --client 192.168.1.5 --port 7340 \
    --count 100 --interval 400 --sync-interval 2000

latency-demo

Measure end-to-end event latency. The client sends keyboard input to the server after a random delay; the server echoes a completion timestamp. Results are printed to the terminal and saved as an HTML report.

# Server
impatience latency-demo --server 0.0.0.0 --port 7341

# Client
impatience latency-demo --client 192.168.1.5 --port 7341 \
    --sync-interval 2000 --max-delay 100

Library Overview

Module Purpose
instrumentation Profiler, Span, LatencyAggregator
clocks PeerClock (thread-safe), SyncedClock (raw), formatting helpers
net Handshake (Initiator / Responder), SyncScheduler, packet types
timesync TimeSynchroniser algorithm and rollover-safe Counter24
time Wall-clock time utilities

Level 1: Instrumentation

Use Profiler and PeerClock for application-level latency tracking. Profiler::start creates a Span; Profiler::finish_remote records the latency when a remote completion timestamp arrives. LatencyAggregator and Snapshot provide percentile statistics and console reporting.

Level 2: Network Protocol

Use net::Initiator and net::Responder for the two-way handshake that establishes peer start times. SyncScheduler tracks when to emit periodic sync heartbeats. Packet types (Packet, StartClockPacket, SyncPacket, etc.) are archived with rkyv and serialised via Packet::to_bytes and Packet::from_bytes.

Level 3: Clock Primitives

Use SyncedClock when you need raw probe and sync update methods plus correction values without the thread-safe PeerClock wrapper. It is single-threaded and does not track peer start times; callers must manage thread safety and peer-start tracking themselves.

Level 4: Algorithm Core

Use TimeSynchroniser and Counter24 to study or extend the windowed-minimum one-way delay algorithm and rollover-safe fixed-bit-width counter arithmetic. This layer is suitable for porting the algorithm to other languages or experimenting with custom windowing strategies.

Interoperability

Wire Format

Built-in packet types are serialised with rkyv. Non-Rust peers must either link an rkyv deserializer or parse the archived bytes directly.

Custom formats (JSON, Protobuf, etc.) are supported by implementing the Probe and PeerSync traits. PeerClock and SyncedClock work with any type that implements these traits, so the built-in packet types are optional.

Protocol

Clock synchronisation runs over UDP in two phases:

  1. Handshake: Client sends StartClock, server replies with AckStartClock.
  2. Periodic sync: Both peers exchange SyncPacket containing a 24-bit truncated local timestamp and a minimum one-way-delay estimate. The receiver expands the truncated timestamp back to 64 bits using rollover-safe Counter24 arithmetic.

Thread Safety

PeerClock is Clone + Send + Sync (backed by Arc<Mutex<_>>). The lower-level types (TimeSynchroniser, SyncedClock, WindowedMinTS24) are single-threaded.

Cargo Features

Feature Default Description
std yes Enables time, clocks, net, instrumentation, and rkyv packet serialisation
alloc implied by std Foundation for no_std environments with heap allocation
cli yes Builds the impatience binary with the sync-test and latency-demo tools
svg yes SVG chart generation (histogram_svg, scatter_plot_svg)
serde yes Serialize/Deserialize derives on select types (e.g. Snapshot)
uncertainty no Statistical confidence intervals via statrs

Use in no_std environments (only the timesync module is available):

[dependencies]
impatience = { version = "1.0", default-features = false }

Enable the uncertainty feature for statistical confidence intervals:

[dependencies]
impatience = { version = "1.0", features = ["uncertainty"] }

The CLI tools can be installed with:

cargo install impatience

License

GPL-3.0, see LICENSE.md for details.

Acknowledgements

This project used the TimeSync library by Chris Taylor as a basis. Indeed, the timesync module is more or less a straight port of that library to Rust.