( )⚙ D1259 debugdatapack: print delta and blob size totals and compression %

This is an archive of the discontinued Mercurial Phabricator instance.

debugdatapack: print delta and blob size totals and compression %
ClosedPublic

Authored by phillco on Oct 27 2017, 6:05 PM.
Tags
None
Subscribers
None

Details

Summary

Also print "(Root)" if the filename is empty.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

phillco created this revision.Oct 27 2017, 6:05 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 27 2017, 6:05 PM
phillco updated this revision to Diff 3142.Oct 27 2017, 6:31 PM
phillco edited the summary of this revision. (Show Details)Oct 27 2017, 6:32 PM
phillco edited the summary of this revision. (Show Details)Oct 30 2017, 11:53 PM
phillco retitled this revision from debugdatapack: print delta and blob size totals, if present to debugdatapack: print delta ana blob size totals and compression %.
phillco updated this revision to Diff 3167.
phillco retitled this revision from debugdatapack: print delta ana blob size totals and compression % to debugdatapack: print delta and blob size totals and compression %.Oct 30 2017, 11:53 PM
phillco added a reviewer: durham.
phillco updated this revision to Diff 3171.Oct 31 2017, 2:02 AM
durham accepted this revision.Oct 31 2017, 4:05 PM

Some tweaks suggested in the comments, but not enough to block accepting.

remotefilelog/debugcommands.py
221

It seems odd that the dictionary keeps track of all the old sizes as well. Since we print out the accumulated data after each file's batch of entries, seems like these could just be int's that we reset to 0 every time we do a print.

Especially since if we don't do this then if a file appears non-contiguously twice in a pack, the second one will show totals that include the first ones numbers, which will be confusing UI wise since the columns above the total won't match the total.

232

I wouldn't hard code "root" here, since that is naming specific to the tree implementation and the pack files are arbitrary storage. Maybe "(empty)" or "(empty name)" or something instead.

This revision is now accepted and ready to land.Oct 31 2017, 4:05 PM