зеркало из https://github.com/microsoft/git.git
Trace2:gvfs:experiment: capture more 'tracking' details
Update tracing around report_tracking() to use 'tracking' category rather than 'exp' category. Add ahead/behind results from stat_tracking_info(). Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This commit is contained in:
Родитель
1611c07e7a
Коммит
425aff2a11
|
@ -1019,12 +1019,12 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
|
|||
(new_branch_info->path || (!opts->force_detach && !strcmp(new_branch_info->name, "HEAD")))) {
|
||||
unsigned long nr_unpack_entry_at_start;
|
||||
|
||||
trace2_region_enter("exp", "report_tracking", the_repository);
|
||||
trace2_region_enter("tracking", "report_tracking", the_repository);
|
||||
nr_unpack_entry_at_start = get_nr_unpack_entry();
|
||||
report_tracking(new_branch_info);
|
||||
trace2_data_intmax("exp", NULL, "report_tracking/nr_unpack_entries",
|
||||
trace2_data_intmax("tracking", NULL, "report_tracking/nr_unpack_entries",
|
||||
(intmax_t)(get_nr_unpack_entry() - nr_unpack_entry_at_start));
|
||||
trace2_region_leave("exp", "report_tracking", the_repository);
|
||||
trace2_region_leave("tracking", "report_tracking", the_repository);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
remote.c
10
remote.c
|
@ -19,6 +19,7 @@
|
|||
#include "setup.h"
|
||||
#include "string-list.h"
|
||||
#include "strvec.h"
|
||||
#include "trace2.h"
|
||||
#include "commit-reach.h"
|
||||
#include "advice.h"
|
||||
#include "connect.h"
|
||||
|
@ -2264,7 +2265,16 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
|
|||
char *base;
|
||||
int upstream_is_gone = 0;
|
||||
|
||||
trace2_region_enter("tracking", "stat_tracking_info", NULL);
|
||||
sti = stat_tracking_info(branch, &ours, &theirs, &full_base, 0, abf);
|
||||
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_flags", abf);
|
||||
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_result", sti);
|
||||
if (sti >= 0 && abf == AHEAD_BEHIND_FULL) {
|
||||
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_ahead", ours);
|
||||
trace2_data_intmax("tracking", NULL, "stat_tracking_info/ab_behind", theirs);
|
||||
}
|
||||
trace2_region_leave("tracking", "stat_tracking_info", NULL);
|
||||
|
||||
if (sti < 0) {
|
||||
if (!full_base)
|
||||
return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче