diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-08-18 15:20:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-23 15:12:06 -0700 |
commit | 8e21176c3cff203c1b991fda55df3ac7904d09fa (patch) | |
tree | ff15441202af10c024be29e563ec03db66d03f17 /packfile.c | |
parent | 6d6a80e06893f391b4aaafa8829f1cb3a0ac23f6 (diff) | |
download | git-8e21176c3cff203c1b991fda55df3ac7904d09fa.tar.gz |
pack: move pack_report()
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packfile.c b/packfile.c index 0f46e06175..60d9fc3b03 100644 --- a/packfile.c +++ b/packfile.c @@ -35,3 +35,27 @@ struct packed_git *packed_git; static struct mru packed_git_mru_storage; struct mru *packed_git_mru = &packed_git_mru_storage; + +#define SZ_FMT PRIuMAX +static inline uintmax_t sz_fmt(size_t s) { return s; } + +void pack_report(void) +{ + fprintf(stderr, + "pack_report: getpagesize() = %10" SZ_FMT "\n" + "pack_report: core.packedGitWindowSize = %10" SZ_FMT "\n" + "pack_report: core.packedGitLimit = %10" SZ_FMT "\n", + sz_fmt(getpagesize()), + sz_fmt(packed_git_window_size), + sz_fmt(packed_git_limit)); + fprintf(stderr, + "pack_report: pack_used_ctr = %10u\n" + "pack_report: pack_mmap_calls = %10u\n" + "pack_report: pack_open_windows = %10u / %10u\n" + "pack_report: pack_mapped = " + "%10" SZ_FMT " / %10" SZ_FMT "\n", + pack_used_ctr, + pack_mmap_calls, + pack_open_windows, peak_pack_open_windows, + sz_fmt(pack_mapped), sz_fmt(peak_pack_mapped)); +} |