Skip to content

Shaheer12345678/cpp-log-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Log Parser & Profiler

Command-line tool to parse large log files and compute stats:

  • Top-K error messages by frequency
  • Latency histogram (ms buckets)
  • Simple RAII scoped timer to profile hot paths

Build

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
./build/logprof --help

Run example

./build/logprof sample.log --top 5 --latency-col 3 --delimiter ','

Tests

cmake -S . -B build -DENABLE_TESTS=ON
cmake --build build -j
ctest --test-dir build --output-on-failure

Notes

  • Uses std::string_view for zero-copy tokenization.
  • Accepts CSV-like logs; adjust --latency-col to your column (0-based).

About

Command-line tool to parse large log files and compute stats (top errors, latency histograms). Used C++17/STL, wrote benchmarks, and profiled hot paths to get ~3× speedup vs baseline.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors