Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Header-only C++20 library for lock-free, time-stamped metric recording in multi-threaded applications.

Notifications You must be signed in to change notification settings

BIBlical33/metrics-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metrics Recorder

CMake C++20

Overview

Metrics Recorder is a modern, header-only C++20 library for collecting and logging time-stamped metrics in a lock-free, multi-threaded environment. It is designed for scenarios where event metrics (such as CPU usage or HTTP requests per second) must be recorded with minimal performance overhead and serialized to a human-readable log file.

Features

  • Header-only C++20 library — easy to integrate
  • Lock-free metric updates using libcds skip-list
  • Supports any value type (float, int, etc.)
  • Clean, timestamped text log format
  • Zero interference with application threads that produce events

Get started

Build and Usage Guide

Log Format

Each log line includes:

  • A timestamp with millisecond precision
  • Quoted metric names
  • Corresponding values

Example

2025-06-01 15:00:01.653 "CPU" 0.97 "HTTP requests RPS" 42
2025-06-01 15:00:02.653 "CPU" 1.12 "HTTP requests RPS" 30

About

Header-only C++20 library for lock-free, time-stamped metric recording in multi-threaded applications.

Topics

Resources

Stars

Watchers

Forks