From 19f8ecfe62f0affc1efa022076f5bf5d0c89d858 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 28 Sep 2020 00:28:43 +0200 Subject: [PATCH] In build debug output, print the total size. --- plocate-build.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plocate-build.cpp b/plocate-build.cpp index 8e004e7..b64d06f 100644 --- a/plocate-build.cpp +++ b/plocate-build.cpp @@ -231,10 +231,13 @@ void do_build(const char *infile, const char *outfile) fclose(outfp); + size_t total_bytes = (bytes_for_trigrams + bytes_for_posting_lists + bytes_for_filename_index + bytes_for_filenames); + dprintf("Trigrams: %'7.1f MB\n", bytes_for_trigrams / 1048576.0); dprintf("Posting lists: %'7.1f MB\n", bytes_for_posting_lists / 1048576.0); dprintf("Filename index: %'7.1f MB\n", bytes_for_filename_index / 1048576.0); dprintf("Filenames: %'7.1f MB\n", bytes_for_filenames / 1048576.0); + dprintf("Total: %'7.1f MB\n", total_bytes / 1048576.0); dprintf("\n"); } -- 2.39.2