alexmojaki / alexmojaki/snoop

Add a comparison mode: disable timestamps, obscure 0xblah repr pointers, & canonicalize pathnames

Đang mở
#46 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.5k
Fork
42
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

My first use of snoop was to compare execution logs for a buggy area of the code between two runs to figure out where their behavior diverged. _(A weak form of co-execution I suppose)_

But before I could use diff, I had to post process the snoop output to remove the timestamps, obscure the repr's that contain 0x7f267b0a00 style memory addresses, and canonicalize the pathnames in str reprs that contained them as they differed between each execution environment.

It'd be nice to have a way to do a lot of this upfront via parameters to snoop() itself. I propose both of these:

* [x] Add the ability to omit timestamps.
* [ ] Accept a repr post-processing callable.

The latter would allow for hex pointer value matching and cleanup as well as pathname cleanup. A pointer value cleanup only function could be provided as an example. Beyond that it's probably getting individual use case and application specific as to what people need to sanitize to make execution log comparisons easy.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.