Commit 306b03b1 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Collect metrics on git_map_branches

R=calamity@chromium.org

Change-Id: Iee4634462c598685032c8a5ffcfd3b9766726958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3482664
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarChristopher Lam <calamity@chromium.org>
Commit-Queue: Christopher Lam <calamity@chromium.org>
parent 64f5f26f
......@@ -28,6 +28,7 @@ from __future__ import print_function
import argparse
import collections
import metrics
import os
import subprocess2
import sys
......@@ -311,6 +312,7 @@ def print_desc():
print(outline)
print('')
@metrics.collector.collect_metrics('git map-branches')
def main(argv):
setup_color.init()
if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
......@@ -349,7 +351,8 @@ def main(argv):
if __name__ == '__main__':
try:
sys.exit(main(sys.argv[1:]))
with metrics.collector.print_notice_and_exit():
sys.exit(main(sys.argv[1:]))
except KeyboardInterrupt:
sys.stderr.write('interrupted\n')
sys.exit(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment