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
Generate dot file format #121
Conversation
The log content can be converted into dot file format
zdb log print [-d,--dot] -p
* Add rankdir Right to left * Adjust the newlines, such they are written into one line and add a newline for dot. Reduces lines in the resulting file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @Zelldon I like it! 👍
I have a few suggestions, but nothing blocking. Also note that the code scanning is pointing out some style problems.
Format option allows to change log print output. Defaults to json, new option is dot format. Later we can add compact for example
Thank you @korthout for your review ! ❤️ 🙇 |
@Zelldon Since you refer to the PR in the release, please update the PR description with the new --format flag usage |
@korthout done. I add yesterday more details to the readme see here https://github.com/Zelldon/zdb#format |
Format flag has changed to
-f, --format
, see here for more details.Add support for dot file format on the log print command
Resources:
Example:
From test generated:
test.dot
Generate dot file via:
zdb log print -d -p ~/playground/raft-partition/partitions/1/ > output.dot
Generate svg
dot -Tsvg -o test.svg test.dot