[PATCH v1 17/25] structured-logging: add aux-data for index size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>

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 <jeffhost@xxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux