Nanosecond C message logger
Hello, Some time ago I did a data logger for fun, just to check if I could beat the performance of an old C++ project of mine (mini-async-log) and to avoid letting my multithreading-C skills rust when on a non-programming gig (using Yocto/OE, very little programming). This project is a BSD licensed, producer-wait-free (when using thread-local storage) generic message logger with high performance, decent test coverage, and type-safe C strings (requires C11 or C++ compiler). It was a shame to let this project to die unknown, as I think that it has potential to be used on some niches as…
What it does
In the maker’s words, at launch
Hello, Some time ago I did a data logger for fun, just to check if I could beat the performance of an old C++ project of mine (mini-async-log) and to avoid letting my multithreading-C skills rust when on a non-programming gig (using Yocto/OE, very little programming). This project is a BSD licensed, producer-wait-free (when using thread-local storage) generic message logger with high performance, decent test coverage, and type-safe C strings (requires C11 or C++ compiler). It was a shame to let this project to die unknown, as I think that it has potential to be used on some niches as network programs, HFT, games, etc. so here I am sharing it. https://github.com/RafaGago/mini-async-log This was an evolution of a similar logger I did, this time I wanted to achieve wait-free producers, so this implementation can use thread-local storage to achieve that. Some other non allocation-free strategies are also available. I still aimed for as easy as possible usage/learning curve and maintenance vs lots of features. It has some interesting things too: -It has one modification on Djukov's MPMC queue to make it MPSC and accepting variable (but limited) bucket size allocations (at the expense of unfairness towards bigger buckets). There are more modifications/variations on this Djukov queue on the library where I'm collecting all the generic stuff that I use when developing C programs. -The project still maintains automatic type detection of the string formatters by using "clever" hardcore C preprocessor abuse mixed with C11 type-generic expressions. It still accepts most non-type printf modifiers. This is at the same time beautiful and ugly (you know what I mean), for the uglyness part, automated testing is available. NOTE: Untested on Windows.
Does the same job
all alternatives →- AMA minimal C runtime for Linux i386 and x86_64 in 87 SLOC of C2015 · github.com · ▲172
- UCuThreads – Concurrent User Threads in C and C++2016 · samanbarghi.com · ▲135
- TCTiny C runtime Linux (rt0), HelloWorld 0.6k (i386), sbrk example added2015 · github.com · ▲49
- HIHellepoll is a blazingly-fast async HTTP server written in C++2011 · github.com · ▲35
This is based on an approach I made for a very high performance message and video multiplexing server. The project died, but I'm glad I get to share the a basic version with some http test code now. I admit this is the second time I've tried to show this off here today; I posted earlier but it got lost when no-one was watching :(
- MFMinimal freestanding C runtime for bare-metal/embedded PC projects2015 · github.com · ▲97
- ATA thread hierarchy management library in C2020 · github.com · ▲53
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, January 2019
the whole month →- IT
Life & fun · 2019 · s-poony.github.io
- MV
Life & fun · 2019 · blog.filippo.io

- HA
Life & fun · 2019 · hn.academy
Clean Mockups▲741Create stunning mockups that make your design standout
Dev tools · 2019 · cleanmock.com
