summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2022-10-24 15:41:06 +0200
committerJunio C Hamano <gitster@pobox.com>2022-10-24 21:45:26 +0200
commit8ad575646c0b1e927a05650a1ec64125121ae591 (patch)
tree17b2fb75a11ed67ca4490d59d10657c849efef38 /Makefile
parenttrace2: convert ctx.thread_name from strbuf to pointer (diff)
downloadgit-8ad575646c0b1e927a05650a1ec64125121ae591.tar.xz
git-8ad575646c0b1e927a05650a1ec64125121ae591.zip
trace2: add stopwatch timers
Add stopwatch timer mechanism to Trace2. Timers are an alternative to Trace2 Regions. Regions are useful for measuring the time spent in various computation phases, such as the time to read the index, time to scan for unstaged files, time to scan for untracked files, and etc. However, regions are not appropriate in all places. For example, during a checkout, it would be very inefficient to use regions to measure the total time spent inflating objects from the ODB from across the entire lifetime of the process; a per-unzip() region would flood the output and significantly slow the command; and some form of post-processing would be requried to compute the time spent in unzip(). Timers can be used to measure a series of timer intervals and emit a single summary event (at thread and/or process exit). Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6bfb62cbe9..fe38b35b20 100644
--- a/Makefile
+++ b/Makefile
@@ -1102,6 +1102,7 @@ LIB_OBJS += trace2/tr2_tgt_event.o
LIB_OBJS += trace2/tr2_tgt_normal.o
LIB_OBJS += trace2/tr2_tgt_perf.o
LIB_OBJS += trace2/tr2_tls.o
+LIB_OBJS += trace2/tr2_tmr.o
LIB_OBJS += trailer.o
LIB_OBJS += transport-helper.o
LIB_OBJS += transport.o