Offline Cross Profiler [portable] May 2026
package offlineprofiler import ( "os" "sync/atomic" "time" "github.com/segmentio/kafka-go/snappy" )
"timestamp_ns": 1732145678123456789, "core_id": 3, "pid_tid": "1337/1402", "domain": "CPU", "metric": "cycles_stalled_backend", "value": 42000, "stack_id": "0x7fffdeadbeef" offline cross profiler
type Event struct Ts uint64 PID uint32 Domain string // "cpu", "mem", "io" Key string // "cycles", "page_fault", "write_bytes" Value uint64 Stack []uintptr "io" Key string // "cycles"
if idx%1024 == 0 // Flush every 1024 events r.flush() offline cross profiler