-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
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.
Small comments, but this is really nice 🦑
csv-comparator $BASELINE_FILE $COMPARISON_FILE | \ | ||
sort | \ | ||
awk -F"," '{printf "`%s`,%.2f kb,%.2f kb\n", $1, $2, $3}' | \ | ||
sed --regexp-extended 's/^([0-9])/,+\1/g' | \ |
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.
What's this doing? My regex brain is too smol
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.
Prepends a plus in front of positive numbers. Yeah we could definitely move all of this into csv-comparator
. I added a comment as well.
# Append the original optimized size (i.e. not the delta) to the end of each line | ||
cat $COMPARISON_FILE | \ | ||
sort | uniq | \ | ||
egrep --only-matching ', [0-9]+\.[0-9]+$' | \ |
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.
I wonder if maybe we should install ripgrep
in our CI Docker image, might make some of this stuff more readable
sed --regexp-extended 's/(-+)\:/:\1/' | \ | ||
sed 's/$/\\n/g' | \ | ||
tr -d '\n' | \ | ||
tee contract-size-diff-nl.md |
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.
What's nl
?
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.
newline, I changed the name.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Final step for closing #4 after prior work by @HCastano.
Example of how it looks.
Ideally we would move the number-formatting stuff into
csv-comparator
, but that can be done in a follow-up if someone feels like it.