From: Jeff Hostetler <jeffh...@microsoft.com>

Teach do_read_index() and do_write_index() to record the size of the index
in aux-data.  This will be reported in the "cmd_exit" event.

Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com>
---
 read-cache.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/read-cache.c b/read-cache.c
index 7fe66b5..b6e2cfa 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1916,6 +1916,8 @@ int read_index_from(struct index_state *istate, const 
char *path,
        slog_stop_timer(slog_tid);
        trace_performance_since(start, "read cache %s", path);
 
+       slog_aux_intmax("index", "cache_nr", istate->cache_nr);
+
        split_index = istate->split_index;
        if (!split_index || is_null_oid(&split_index->base_oid)) {
                post_read_index_from(istate);
@@ -1937,6 +1939,8 @@ int read_index_from(struct index_state *istate, const 
char *path,
                    base_oid_hex, base_path,
                    oid_to_hex(&split_index->base->oid));
 
+       slog_aux_intmax("index", "split_index_cache_nr", 
split_index->base->cache_nr);
+
        freshen_shared_index(base_path, 0);
        merge_base_index(istate);
        post_read_index_from(istate);
-- 
2.9.3

Reply via email to