Skip to content

Commit d47dd77

Browse files
jeffhostetlerGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
fsmonitor: measure time taken to apply fsmonitor query result
Signed-off-by: Jeff Hostetler <[email protected]>
1 parent a8f7505 commit d47dd77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fsmonitor.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ void refresh_fsmonitor(struct index_state *istate)
403403
* information and that we should consider everything
404404
* invalid. We call this a trivial response.
405405
*/
406+
trace2_region_enter("fsmonitor", "apply_results", istate->repo);
407+
406408
if (query_success && query_result.buf[bol] != '/') {
407409
/*
408410
* Mark all pathnames returned by the monitor as dirty.
@@ -431,6 +433,9 @@ void refresh_fsmonitor(struct index_state *istate)
431433
if (count > fsmonitor_force_update_threshold)
432434
istate->cache_changed |= FSMONITOR_CHANGED;
433435

436+
trace2_data_intmax("fsmonitor", istate->repo, "apply_count",
437+
count);
438+
434439
} else {
435440
/*
436441
* We received a trivial response, so invalidate everything.
@@ -458,6 +463,8 @@ void refresh_fsmonitor(struct index_state *istate)
458463
if (istate->untracked)
459464
istate->untracked->use_fsmonitor = 0;
460465
}
466+
trace2_region_leave("fsmonitor", "apply_results", istate->repo);
467+
461468
strbuf_release(&query_result);
462469

463470
/* Now that we've updated istate, save the last_update_token */

0 commit comments

Comments
 (0)