Introduce a new tool to diagnose setup.exe's stage timings without having to instrument setup.exe itself.
Introduce a new tool to diagnose setup.exe's stage timings without having to instrument setup.exe itself.

Here is an example output when observing an update from M29 to M30 via a diff-installer on an XP VM:
"""
No ongoing stage, waiting for next install/update cycle...
12/10/13 17:22:55: Starting stage 2...
12/10/13 17:23:06: Stage 2 took 10.03 seconds.
12/10/13 17:23:06: Starting stage 4...
12/10/13 17:23:52: Stage 4 took 46.32 seconds.
12/10/13 17:23:52: Starting stage 17...
12/10/13 17:23:52: Stage 17 took 0.04 seconds.
12/10/13 17:23:52: Starting stage 6...
12/10/13 17:23:52: Stage 6 took 0.06 seconds.
12/10/13 17:23:52: Starting stage 7...
12/10/13 17:23:52: Stage 7 took 0.50 seconds.
12/10/13 17:23:52: Starting stage 9...
12/10/13 17:23:54: Stage 9 took 1.28 seconds.
12/10/13 17:23:54: Starting stage 12...
12/10/13 17:23:54: Stage 12 took 0.56 seconds.
12/10/13 17:23:54: Starting stage 15...
12/10/13 17:23:55: Stage 15 took 0.20 seconds.
12/10/13 17:23:55: Install/update complete, stages timings:
[
  {
    "stage": 2,
    "time": 10.029999999999999
  },
  {
    "stage": 4,
    "time": 46.32
  },
  {
    "stage": 17,
    "time": 0.040000000000000001
  },
  {
    "stage": 6,
    "time": 0.059999999999999998
  },
  {
    "stage": 7,
    "time": 0.5
  },
  {
    "stage": 9,
    "time": 1.28
  },
  {
    "stage": 12,
    "time": 0.56000000000000005
  },
  {
    "stage": 15,
    "time": 0.20000000000000001
  }
]
12/10/13 17:23:55: No more stages, waiting for next install/update cycle...
"""

NOTRY=True
BUG=167622

Review URL: https://codereview.chromium.org/109003003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@241020 0039d316-1c4b-4281-b951-d872f2087c98

patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,Chilledheart/chromium,patrickm/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,anirudhSK/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,Just-D/chromium-1,dednal/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,M4sse/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,markYoungH/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,ondra-novak/chromium.src,ltilve/chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,littlstar/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,littlstar/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,jaruba/chromium.src,dednal/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,littlstar/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,jaruba/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,dushu1203/chromium.src,dushu1203/chromium.src,ltilve/chromium,dushu1203/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,dednal/chromium.src,Just-D/chromium-1,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,M4sse/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl