tests/test-profile.t
changeset 30330 3fd53cc1aad8
parent 30329 faf1b8923da2
child 30845 262c2be8ea5a
equal deleted inserted replaced
30329:faf1b8923da2 30330:3fd53cc1aad8
    64   > sleep = `pwd`/sleepext.py
    64   > sleep = `pwd`/sleepext.py
    65   > EOF
    65   > EOF
    66 
    66 
    67 statistical profiler works
    67 statistical profiler works
    68 
    68 
    69   $ HGPROF=stat hg --profile sleep 2>../out
    69   $ hg --profile sleep 2>../out
    70   $ grep Sample ../out
    70   $ grep Sample ../out
    71   Sample count: \d+ (re)
    71   Sample count: \d+ (re)
    72 
    72 
    73 Various statprof formatters work
    73 Various statprof formatters work
    74 
    74 
    75   $ HGPROF=stat hg --profile --config profiling.statformat=byline sleep 2>../out
    75   $ hg --profile --config profiling.statformat=byline sleep 2>../out
    76   $ head -n 1 ../out
    76   $ head -n 1 ../out
    77     %   cumulative      self          
    77     %   cumulative      self          
    78   $ grep Sample ../out
    78   $ grep Sample ../out
    79   Sample count: \d+ (re)
    79   Sample count: \d+ (re)
    80 
    80 
    81   $ HGPROF=stat hg --profile --config profiling.statformat=bymethod sleep 2>../out
    81   $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
    82   $ head -n 1 ../out
    82   $ head -n 1 ../out
    83     %   cumulative      self          
    83     %   cumulative      self          
    84   $ grep Sample ../out
    84   $ grep Sample ../out
    85   Sample count: \d+ (re)
    85   Sample count: \d+ (re)
    86 
    86 
    87   $ HGPROF=stat hg --profile --config profiling.statformat=hotpath sleep 2>../out
    87   $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
    88   $ grep Sample ../out
    88   $ grep Sample ../out
    89   Sample count: \d+ (re)
    89   Sample count: \d+ (re)
    90 
    90 
    91   $ HGPROF=stat hg --profile --config profiling.statformat=json sleep 2>../out
    91   $ hg --profile --config profiling.statformat=json sleep 2>../out
    92   $ cat ../out
    92   $ cat ../out
    93   \[\[\d+.* (re)
    93   \[\[\d+.* (re)
    94 
    94 
    95   $ cd ..
    95   $ cd ..