@matheusbsbs / matheus-bagliano / commits / 2bc45477a5
Fork 0

git-blame: add internal statistics to count read blobs.

Junio C Hamano committed Nov 5, 2006 at 11:47 UTC 2bc45477a53b9b7a5202a816b96c14428f683c38
1 file changed +3
blame.c
+3
@@ -59,6 +59,7 @@ static void get_blob(struct commit *commit);
59 static int num_get_patch;
60 static int num_commits;
61 static int patch_time;
62 +static int num_read_blob;
63
64 struct blame_diff_state {
65 struct xdiff_emit_state xm;
@@ -204,6 +205,7 @@ static void get_blob(struct commit *commit)
205 return;
206
207 info->buf = read_sha1_file(info->sha1, type, &info->size);
208 + num_read_blob++;
209
210 assert(!strcmp(type, blob_type));
211 }
@@ -910,6 +912,7 @@ int main(int argc, const char **argv)
912 }
913
914 if (DEBUG) {
915 + printf("num read blob: %d\n", num_read_blob);
916 printf("num get patch: %d\n", num_get_patch);
917 printf("num commits: %d\n", num_commits);
918 printf("patch time: %f\n", patch_time / 1000000.0);