mercurial/statprof.py
changeset 48521 d2fff292c265
parent 48520 c1fe758c1530
child 48966 6000f5b25c9b
equal deleted inserted replaced
48520:c1fe758c1530 48521:d2fff292c265
   492     '''Print statistics, either to stdout or the given file object.'''
   492     '''Print statistics, either to stdout or the given file object.'''
   493     if data is None:
   493     if data is None:
   494         data = state
   494         data = state
   495 
   495 
   496     if fp is None:
   496     if fp is None:
   497         import sys
   497         from .utils import procutil
   498 
   498 
   499         fp = sys.stdout
   499         fp = procutil.stdout
   500     if len(data.samples) == 0:
   500     if len(data.samples) == 0:
   501         fp.write(b'No samples recorded.\n')
   501         fp.write(b'No samples recorded.\n')
   502         return
   502         return
   503 
   503 
   504     if format == DisplayFormats.ByLine:
   504     if format == DisplayFormats.ByLine: