tests/test-profile.t
changeset 40369 ef6cab7930b3
parent 40200 9cc411952ab9
child 40380 1ce4fe0603a6
equal deleted inserted replaced
40368:fad6068249d9 40369:ef6cab7930b3
    64 
    64 
    65 Install an extension that can sleep and guarantee a profiler has time to run
    65 Install an extension that can sleep and guarantee a profiler has time to run
    66 
    66 
    67   $ cat >> sleepext.py << EOF
    67   $ cat >> sleepext.py << EOF
    68   > import time
    68   > import time
    69   > from mercurial import registrar, commands
    69   > from mercurial import registrar
    70   > cmdtable = {}
    70   > cmdtable = {}
    71   > command = registrar.command(cmdtable)
    71   > command = registrar.command(cmdtable)
    72   > @command(b'sleep', [], b'hg sleep')
    72   > @command(b'sleep', [], b'hg sleep')
    73   > def sleep(ui, *args, **kwargs):
    73   > def sleep(ui, *args, **kwargs):
    74   >     time.sleep(0.1)
    74   >     time.sleep(0.1)