Re: Git Test Coverage Report (April 16, 2020)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux