Warn on long presubmits, like on long hooks
Warn on long presubmits, like on long hooks

Presubmits when uploading occasionally take a very long time - over a
minute - and after the fact there is no easy way to know why. This makes
fixes to slow presubmits take longer.

This change builds on crrev.com/c/2532895 to print a message when any
individual presubmit function takes longer than ten seconds. During
normal usage this is a NOP but it will presumably find the long poles
when presubmits are running particularly slowly.

This is similar to gclient runhooks where any hooks that take longer
than ten seconds have their run time printed.

Change-Id: If57ed35d7a7d221f6380e9b97cf72af56f75e441
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2911594
Reviewed-by: Dirk Pranke <6693ee08b084bb2ffa767f664c99b689395e0e4b@google.com>
Commit-Queue: Bruce Dawson <fe9e26f3989304bf7275ed139c57fd059c63d22d@chromium.org>

CoherentLabs/depot_tools,CoherentLabs/depot_tools