From 25e4b8099c0ed4c2b4eeb3c8a7edce3785d9aeab Mon Sep 17 00:00:00 2001 From: Josh Steadmon Date: Wed, 2 Oct 2019 16:49:29 -0700 Subject: push: add trace2 instrumentation Add trace2 regions in transport.c and builtin/push.c to better track time spent in various phases of pushing: * Listing refs * Checking submodules * Pushing submodules * Pushing refs Signed-off-by: Josh Steadmon Signed-off-by: Junio C Hamano --- builtin/push.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin/push.c') diff --git a/builtin/push.c b/builtin/push.c index 3742daf7b0..cc1292a566 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -357,8 +357,10 @@ static int push_with_options(struct transport *transport, struct refspec *rs, if (verbosity > 0) fprintf(stderr, _("Pushing to %s\n"), transport->url); + trace2_region_enter("push", "transport_push", the_repository); err = transport_push(the_repository, transport, rs, flags, &reject_reasons); + trace2_region_leave("push", "transport_push", the_repository); if (err != 0) { fprintf(stderr, "%s", push_get_color(PUSH_COLOR_ERROR)); error(_("failed to push some refs to '%s'"), transport->url); -- cgit v1.2.3