Skip to content

Commit 83603c7

Browse files
committed
Add binary writer for sampling profiler
Implements streaming binary output with delta compression. The writer tracks per-thread state to encode stack changes efficiently: identical stacks use RLE, similar stacks encode only the differing frames. String and frame deduplication uses Python's hashtable implementation for O(1) lookup during interning. The 512KB write buffer amortizes syscall overhead. When zstd is available, data streams through compression before hitting disk. Finalization writes the string/frame tables and footer, then seeks back to update the header with final counts and offsets.
1 parent 7dd836b commit 83603c7

File tree

1 file changed

+1206
-0
lines changed

1 file changed

+1206
-0
lines changed

0 commit comments

Comments
 (0)