public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail•com>
To: "git@vger•kernel.org" <git@vger•kernel.org>
Subject: Re: Git Test Coverage Report (April 16, 2020)
Date: Thu, 16 Apr 2020 10:08:43 -0400	[thread overview]
Message-ID: <d4bf43d8-0d56-bbb9-e68f-a4933dacd3d3@gmail.com> (raw)
In-Reply-To: <c797df50-ec21-98a3-58c4-ade0c04284c9@gmail.com>

On 4/16/2020 9:57 AM, Derrick Stolee wrote:
> Derrick Stolee	efb0e3a0 blame: use changed-path Bloom filters
> blame.c
> efb0e3a0 1276) if (origin->commit->generation == GENERATION_NUMBER_INFINITY)
> efb0e3a0 1277) return 1;
> efb0e3a0 1279) filter = get_bloom_filter(r, origin->commit, 0);
> efb0e3a0 1281) if (!filter)
> efb0e3a0 1282) return 1;
> efb0e3a0 1284) bloom_count_queries++;
> efb0e3a0 1285) for (i = 0; i < bd->nr; i++) {
> efb0e3a0 1286) if (bloom_filter_contains(filter,
> efb0e3a0 1287)   bd->keys[i],
> efb0e3a0 1288)   bd->settings))
> efb0e3a0 1289) return 1;
> efb0e3a0 1292) bloom_count_no++;
> efb0e3a0 1293) return 0;
> efb0e3a0 1302) if (bd->nr >= bd->alloc) {
> efb0e3a0 1303) bd->alloc *= 2;
> efb0e3a0 1304) REALLOC_ARRAY(bd->keys, bd->alloc);
> efb0e3a0 1307) bd->keys[bd->nr] = xmalloc(sizeof(struct bloom_key));
> efb0e3a0 1308) fill_bloom_key(path, strlen(path), bd->keys[bd->nr], bd->settings);
> efb0e3a0 1309) bd->nr++;
> efb0e3a0 2903) bd = xmalloc(sizeof(struct blame_bloom_data));
> efb0e3a0 2905) bd->settings = sb->repo->objects->commit_graph->bloom_filter_settings;
> efb0e3a0 2907) bd->alloc = 4;
> efb0e3a0 2908) bd->nr = 0;
> efb0e3a0 2909) ALLOC_ARRAY(bd->keys, bd->alloc);
> efb0e3a0 2911) add_bloom_key(bd, path);
> efb0e3a0 2913) sb->bloom_data = bd;
> efb0e3a0 2920) for (i = 0; i < sb->bloom_data->nr; i++) {
> efb0e3a0 2921) free(sb->bloom_data->keys[i]->hashes);
> efb0e3a0 2922) free(sb->bloom_data->keys[i]);
> efb0e3a0 2924) free(sb->bloom_data->keys);
> efb0e3a0 2925) FREE_AND_NULL(sb->bloom_data);
> efb0e3a0 2927) trace2_data_intmax("blame", sb->repo,
> efb0e3a0 2929) trace2_data_intmax("blame", sb->repo,

For this to be covered, I need to modify my build to use
GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1. I'll have that ready for the next
run.

> Derrick Stolee	72ca4f9b commit: write commit-graph with Bloom filters
> commit-graph.c
> 72ca4f9b 1979) ctx->changed_paths = 1;

Same here, although I will change this line in the next version.
 
Thanks,
-Stolee


  reply	other threads:[~2020-04-16 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 13:57 Git Test Coverage Report (April 16, 2020) Derrick Stolee
2020-04-16 14:08 ` Derrick Stolee [this message]
2020-04-16 16:32 ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4bf43d8-0d56-bbb9-e68f-a4933dacd3d3@gmail.com \
    --to=stolee@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox