commit-graph: add format document
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index ff2188890e223ec8821ef43967425b3435c88c4c..536416ff2df5f7c475deba4739d4edaf340ae898 100644 (file)
--- a/dir.c
+++ b/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,