diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-15 14:55:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-15 14:55:44 -0800 |
commit | 090dbea6843f860de8c981d97d031621176fc2be (patch) | |
tree | 228165692f17cde3632f94b9f26e1f26e3fab617 /dir.c | |
parent | 9b6734e510143d317842b99f91953b71252399e1 (diff) | |
parent | ca54d9baa4a8e73141d4c963245ee6f09dcc994d (diff) | |
download | git-090dbea6843f860de8c981d97d031621176fc2be.tar.gz |
Merge branch 'nd/trace-index-ops'
* nd/trace-index-ops:
trace: measure where the time is spent in the index-heavy operations
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |