Merge branch 'nd/trace-index-ops'
* nd/trace-index-ops: trace: measure where the time is spent in the index-heavy operations
This commit is contained in:
2
dir.c
2
dir.c
@ -2245,6 +2245,7 @@ int read_directory(struct dir_struct *dir, struct index_state *istate,
|
||||
const char *path, int len, const struct pathspec *pathspec)
|
||||
{
|
||||
struct untracked_cache_dir *untracked;
|
||||
uint64_t start = getnanotime();
|
||||
|
||||
if (has_symlink_leading_path(path, len))
|
||||
return dir->nr;
|
||||
@ -2283,6 +2284,7 @@ int read_directory(struct dir_struct *dir, struct index_state *istate,
|
||||
dir->nr = i;
|
||||
}
|
||||
|
||||
trace_performance_since(start, "read directory %.*s", len, path);
|
||||
if (dir->untracked) {
|
||||
static struct trace_key trace_untracked_stats = TRACE_KEY_INIT(UNTRACKED_STATS);
|
||||
trace_printf_key(&trace_untracked_stats,
|
||||
|
Reference in New Issue
Block a user