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 /diff-lib.c | |
| parent | Merge branch 'cc/perf-aggregate' (diff) | |
| parent | trace: measure where the time is spent in the index-heavy operations (diff) | |
| download | git-090dbea6843f860de8c981d97d031621176fc2be.tar.gz git-090dbea6843f860de8c981d97d031621176fc2be.zip | |
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 'diff-lib.c')
| -rw-r--r-- | diff-lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/diff-lib.c b/diff-lib.c index 8104603a3b..a228e1a219 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -92,6 +92,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) int diff_unmerged_stage = revs->max_count; unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED) ? CE_MATCH_RACY_IS_DIRTY : 0); + uint64_t start = getnanotime(); diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/"); @@ -246,6 +247,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) } diffcore_std(&revs->diffopt); diff_flush(&revs->diffopt); + trace_performance_since(start, "diff-files"); return 0; } @@ -512,6 +514,7 @@ static int diff_cache(struct rev_info *revs, int run_diff_index(struct rev_info *revs, int cached) { struct object_array_entry *ent; + uint64_t start = getnanotime(); ent = revs->pending.objects; if (diff_cache(revs, &ent->item->oid, ent->name, cached)) @@ -521,6 +524,7 @@ int run_diff_index(struct rev_info *revs, int cached) diffcore_fix_diff_index(&revs->diffopt); diffcore_std(&revs->diffopt); diff_flush(&revs->diffopt); + trace_performance_since(start, "diff-index"); return 0; } |
