]> git.sesse.net Git - plocate/commitdiff
In build debug output, print the total size.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sun, 27 Sep 2020 22:28:43 +0000 (00:28 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sun, 27 Sep 2020 22:28:43 +0000 (00:28 +0200)
plocate-build.cpp

index 8e004e7bd248b724936c806a24aeb61970718d60..b64d06feffd28c20ec8b700529d6f946010095a5 100644 (file)
@@ -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");
 }