From: git@jeffhostetler.com Date: Fri, 13 Jul 2018 16:56:10 GMT Subject: [PATCH v1 14/25] structured-logging: add timer around preload_index Message-ID: <20180713165621.52017-15-git@jeffhostetler.com> In-Reply-To: <20180713165621.52017-1-git@jeffhostetler.com> From: Jeff Hostetler Use a SLOG timer to record the time spend in preload_index() and report it in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- preload-index.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/preload-index.c b/preload-index.c index 4d08d44..572bb56 100644 --- a/preload-index.c +++ b/preload-index.c @@ -116,8 +116,14 @@ static void preload_index(struct index_state *index, int read_index_preload(struct index_state *index, const struct pathspec *pathspec) { + int slog_tid; int retval = read_index(index); + slog_tid = slog_start_timer("index", "preload"); + preload_index(index, pathspec); + + slog_stop_timer(slog_tid); + return retval; } -- 2.9.3