mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
statprof: require input file
statprof has a __main__ handler that allows viewing of previously written data files. As Yuya pointed out during review, 82ee01726a77 broke this. This patch fixes that.
This commit is contained in:
parent
a0c4b1e6da
commit
9c03a7696d
@ -800,6 +800,10 @@ def main(argv=None):
|
||||
else:
|
||||
assert False, "unhandled option %s" % o
|
||||
|
||||
if not path:
|
||||
print('must specify --file to load')
|
||||
return 1
|
||||
|
||||
load_data(path=path)
|
||||
|
||||
display(**displayargs)
|
||||
|
@ -92,4 +92,10 @@ Various statprof formatters work
|
||||
$ cat ../out
|
||||
\[\[\d+.* (re)
|
||||
|
||||
statprof can be used as a standalone module
|
||||
|
||||
$ $PYTHON -m mercurial.statprof hotpath
|
||||
must specify --file to load
|
||||
[1]
|
||||
|
||||
$ cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user