fsmonitor: measure time taken to apply fsmonitor query result

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This commit is contained in:
Jeff Hostetler
2021-09-21 10:49:19 -04:00
committed by Johannes Schindelin
parent 7428c987b9
commit cd80dd2917

View File

@@ -403,6 +403,8 @@ apply_results:
* information and that we should consider everything
* invalid. We call this a trivial response.
*/
trace2_region_enter("fsmonitor", "apply_results", istate->repo);
if (query_success && query_result.buf[bol] != '/') {
/*
* Mark all pathnames returned by the monitor as dirty.
@@ -431,6 +433,9 @@ apply_results:
if (count > fsmonitor_force_update_threshold)
istate->cache_changed |= FSMONITOR_CHANGED;
trace2_data_intmax("fsmonitor", istate->repo, "apply_count",
count);
} else {
/*
* We received a trivial response, so invalidate everything.
@@ -458,6 +463,8 @@ apply_results:
if (istate->untracked)
istate->untracked->use_fsmonitor = 0;
}
trace2_region_leave("fsmonitor", "apply_results", istate->repo);
strbuf_release(&query_result);
/* Now that we've updated istate, save the last_update_token */