summaryrefslogtreecommitdiff
path: root/trace2.c
diff options
context:
space:
mode:
authorNeeraj Singh <neerajsi@microsoft.com>2022-03-30 05:06:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-30 18:15:55 (GMT)
commit9a4987677d3f65e8cd93b9e77216f0f1026cd9b2 (patch)
treea722fc7be1905b845fd8ef5c6e99cb1c8fc71ed4 /trace2.c
parent805e0a68082a217f0112db9ee86a022227a9c81b (diff)
downloadgit-9a4987677d3f65e8cd93b9e77216f0f1026cd9b2.zip
git-9a4987677d3f65e8cd93b9e77216f0f1026cd9b2.tar.gz
git-9a4987677d3f65e8cd93b9e77216f0f1026cd9b2.tar.bz2
trace2: add stats for fsync operations
Add some global trace2 statistics for the number of fsyncs performed during the lifetime of a Git process. These stats are printed as part of trace2_cmd_exit_fl, which is presumably where we might want to print any other cross-cutting statistics. Signed-off-by: Neeraj Singh <neerajsi@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2.c')
-rw-r--r--trace2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/trace2.c b/trace2.c
index 179caa7..e01cf77 100644
--- a/trace2.c
+++ b/trace2.c
@@ -214,6 +214,7 @@ int trace2_cmd_exit_fl(const char *file, int line, int code)
if (!trace2_enabled)
return code;
+ trace_git_fsync_stats();
trace2_collect_process_info(TRACE2_PROCESS_INFO_EXIT);
tr2main_exit_code = code;