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 <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5fc31180d8
commit
25e4b8099c
@ -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);
|
||||
|
Reference in New Issue
Block a user