{"repo":"fior512/Latte","free":true,"listed":false,"github":"https://github.com/fior512/Latte","clone":"git clone https://github.com/fior512/Latte.git","description":"Latency Telemetry with ultra low overhead","language":"C++","stars":39,"topics":["cpp17","header-only","latency","performance","profiling","cplusplus","hpc","low-latency","telemetry"],"license":"MIT","category":"analytics","readme_excerpt":"☕️ Latte: Ultra-Low Latency C++ Telemetry Framework Latte is a single-header C++ telemetry library designed for high‑frequency trading, game engines, and real‑time systems where measurement overhead must be measured in nanoseconds rather than microseconds. Latte measures CPU cycles using x86 64 timestamp counters (RDTSC / RDTSCP) and stores samples in per‑thread fixed‑size ring buffers for later reporting. Zero allocations in steady state. The first Start(id) per thread allocates a ring buffer entry in the per-thread map; all subsequent calls to the same ID are allocation-free and lock-free. --- Implementation Guide 1. Integration Latte is header-only. Include the file in your project. It requires a C++17 compliant compiler and an x86 64 architecture. 2. Scoped instrumentation (Start/Stop) Use string literals directly as identifiers. No pre-registration is required. Measurement modes: Fast, Mid, Hard Latte provides three levels of timing precision. They differ in ordering guarantees and overhead , choose the right one for your measurement context. Mode Intrinsic(s) Serialization Best for -------- ------------------------- ---------------------- ----------- Fast rdtsc() None Coarse, high‑frequency polling where every cycle matters (e.g., Hot Path). Mid rdtscp() Partial barrier (waits on prior instructions only) Default for function‑level profiling, balanced accuracy and overhead. Hard lfence + rdtscp() and rdtscp() + lfence Full (LFENCE + serialize) Measuring tiny snippets (fe","default_branch":null,"files":null,"tree":[],"storefront":"/r/fior512","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fior512/Latte/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}