3 ms·
Hi, cheap plug here for my really, really low-overhead event tracer: ppt. https://github.com/lally/libmet https://github.com/lally/libmet (BSD license) Basica
by lallysingh 11y ago
Hi, cheap plug here for my really, really low-overhead event tracer: ppt.
https://github.com/lally/libmet https://github.com/lally/libmet (BSD license)
Basically, you define structs that you then fill in your code. Then give them to a ppt-generated library routine. It's a bit of a pain, but you get two nice features:
- The storage is completely non-blocking: you're just writing to shared memory.
- Overhead is linear to write rate: if you have a spare CPU core on the machine, the overhead on your active cores is a constant + the cost of filling & copying (once) the struct.
- It'll prefer to lose some data in case the disk falls behind in writing -- it won't slow down your app. Auto-generated sequence numbers tell you what/if any data was lost.
- You can leave the code on in production: the listener attaches via ptrace() and injects a destination buffer into your process (constant time), and if there's no buffer, the data gets harmlessly dropped.
I've left it alone as I haven't needed it for myself in a while, and there hasn't been interest (I don't really advertise it, though). If anyone's interested, just ping me or file an issue.