-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Add dumprecords command #745
[Proposal] Add dumprecords command #745
Conversation
src/StructuredLogger/BinaryLogger/BinaryLogReplayEventSource.cs
Outdated
Show resolved
Hide resolved
Does it support the full list of all records (not the summary)? Useful for diffing. Even just the types of records would be valuable so that you can diff two .txt files and see what is the first record where they start to differ. Would be nice to support formats before 18 too. We can compute records lengths like ReadRecords does, see my draft in #741 |
@KirillOsenkov - All comments sounds sound and easily accomodable - I'll work on this in a few days. As for:
The ungrouped list is the default mode. I added the optional groupping as that's what I needed for my other investigation. |
When I have to investigate a corrupt binlog, I usually have the good and the bad binlogs. So I dump a flat list of records to see which record is the first broken one. Even the record number and kind would be valuable, but if we can have the size of each record it'd be better (for completeness). If the size of the corrupted record changes, would be nice to know it. We could deduce the record size from the start positions of records in the stream (this is how we show the progress bar when reading the binlog). But of course in the new format we get the record sizes for free. |
ea8d861
to
83d65ff
Compare
Fixes #741
Context
#741 brought a nice idea. I needed something similar for my investigation - just counts, not sizes - so I stitched something for both.
Samples
Just summary on OrchardCore (runs for about 0.7s on my machine):
Details for binlog from new console:
Limitations
Breaking changes
BinLogReader.WrapperStream
was removed. It was public, but hopefully nobody was using it. If yes - they can easily switch toTransparentReadStream
.Perf
Summary for OrchardCore runs ~0.178 seconds with the new binlogs (offsets included), ~1.967 seconds with old binlogs. Both after warmup runs.
On full details dumping the difference is not so visible, as majority of the time is spend flushing the records (it's ~56 vs ~58 seconds)