mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
logginghelper: log obsstore size
Summary: That's an interesting piece of information that we'd like to know. Test Plan: Enable patched logginghelper.py extension and check that new field is logged Reviewers: #mercurial, simonfar Subscribers: mjpieters, #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D4936862 Tasks: 17453793
This commit is contained in:
parent
d610259241
commit
8595e6160c
@ -38,6 +38,15 @@ def _localrepoinit(orig, self, baseui, path=None, create=False):
|
||||
if value is not None:
|
||||
kwargs[name] = value
|
||||
|
||||
obsstore_size = 0
|
||||
try:
|
||||
obsstore_size = self.svfs.stat('obsstore').st_size
|
||||
except Exception:
|
||||
# just ignore exception, it's better than failing the whole command
|
||||
pass
|
||||
|
||||
kwargs['obsstore_size'] = obsstore_size
|
||||
|
||||
self.ui.log("logginghelper",
|
||||
"", # ui.log requires a format string as args[0].
|
||||
**kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user