| Index: gclient.py
|
| diff --git a/gclient.py b/gclient.py
|
| index d61540233362b4581ba8b5f7367f2560b8c57826..ed08e47f423cb96bbd6ba9c9ca2902cbc394cc62 100755
|
| --- a/gclient.py
|
| +++ b/gclient.py
|
| @@ -81,6 +81,7 @@ import posixpath
|
| import pprint
|
| import re
|
| import sys
|
| +import time
|
| import urllib
|
| import urlparse
|
|
|
| @@ -780,6 +781,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
| self._hooks_ran = True
|
| for hook in self.GetHooks(options):
|
| try:
|
| + start_time = time.time()
|
| gclient_utils.CheckCallAndFilterAndHeader(
|
| hook, cwd=self.root.root_dir, always=True)
|
| except (gclient_utils.Error, subprocess2.CalledProcessError), e:
|
| @@ -788,6 +790,11 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
| # differently from VC failures.
|
| print >> sys.stderr, 'Error: %s' % str(e)
|
| sys.exit(2)
|
| + finally:
|
| + elapsed_time = time.time() - start_time
|
| + if elapsed_time > 10:
|
| + print "Hook '%s' took %.2f secs" % (
|
| + gclient_utils.CommandToStr(hook), elapsed_time)
|
|
|
| def subtree(self, include_all):
|
| """Breadth first recursion excluding root node."""
|
|
|