From: Steinar H. Gunderson Date: Sun, 27 Sep 2020 22:28:43 +0000 (+0200) Subject: In build debug output, print the total size. X-Git-Tag: 1.0.0~102 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=19f8ecfe62f0affc1efa022076f5bf5d0c89d858;p=plocate In build debug output, print the total size. --- 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"); }