diff tests/test-profile.t @ 30317:3fd53cc1aad8

profiling: make statprof the default profiler (BC) The statprof sampling profiler runs with significantly less overhead. Its data is therefore more useful. Furthermore, its default output shows the hotpath by default, which I've found to be way more useful than the default profiler's function time table. There is one behavioral regression with this change worth noting: the statprof profiler currently doesn't profile individual hgweb requests like lsprof does. This is because the current implementation of statprof only profiles the thread that started profiling. The ability for lsprof to profile individual hgweb requests is relatively new and likely not widely used. Furthermore, I have plans to modify statprof to support profiling multiple threads. I expect that change to go through several iterations. I'm submitting this patch first so there is more time to test statprof. Perfect is the enemy of good.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 04 Nov 2016 21:44:25 -0700
parents faf1b8923da2
children 262c2be8ea5a
line wrap: on
line diff
--- a/tests/test-profile.t	Fri Nov 04 20:50:38 2016 -0700
+++ b/tests/test-profile.t	Fri Nov 04 21:44:25 2016 -0700
@@ -66,29 +66,29 @@
 
 statistical profiler works
 
-  $ HGPROF=stat hg --profile sleep 2>../out
+  $ hg --profile sleep 2>../out
   $ grep Sample ../out
   Sample count: \d+ (re)
 
 Various statprof formatters work
 
-  $ HGPROF=stat hg --profile --config profiling.statformat=byline sleep 2>../out
+  $ hg --profile --config profiling.statformat=byline sleep 2>../out
   $ head -n 1 ../out
     %   cumulative      self          
   $ grep Sample ../out
   Sample count: \d+ (re)
 
-  $ HGPROF=stat hg --profile --config profiling.statformat=bymethod sleep 2>../out
+  $ hg --profile --config profiling.statformat=bymethod sleep 2>../out
   $ head -n 1 ../out
     %   cumulative      self          
   $ grep Sample ../out
   Sample count: \d+ (re)
 
-  $ HGPROF=stat hg --profile --config profiling.statformat=hotpath sleep 2>../out
+  $ hg --profile --config profiling.statformat=hotpath sleep 2>../out
   $ grep Sample ../out
   Sample count: \d+ (re)
 
-  $ HGPROF=stat hg --profile --config profiling.statformat=json sleep 2>../out
+  $ hg --profile --config profiling.statformat=json sleep 2>../out
   $ cat ../out
   \[\[\d+.* (re)