Offline Cross Profiler Here

"CPU usage is 50%. I don't see the problem."

Running on a developer’s workstation (not the target), the analyzer loads the 10GB trace file, builds indexes on timestamp_ns and stack_id , and executes cross-domain queries. 3. The "Cross" Advantage: Correlating Domains The magic of the offline cross-profiler is not in a single flame graph, but in the intersection of graphs. Consider a real-world bug: High latency in a database. offline cross profiler

func (r *RingRecorder) flush() // Snappy compress and write to offline file // No analysis happens here. "CPU usage is 50%

if idx%1024 == 0 // Flush every 1024 events r.flush() The "Cross" Advantage: Correlating Domains The magic of

type RingRecorder struct buffer []Event head atomic.Uint64 fd *os.File compressor *snappy.Writer

package offlineprofiler import ( "os" "sync/atomic" "time" "github.com/segmentio/kafka-go/snappy" )

type Event struct Ts uint64 PID uint32 Domain string // "cpu", "mem", "io" Key string // "cycles", "page_fault", "write_bytes" Value uint64 Stack []uintptr