diff options
| -rw-r--r-- | src/tags/my_ut_hash.c | 4 | ||||
| -rw-r--r-- | test/test_merge.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tags/my_ut_hash.c b/src/tags/my_ut_hash.c index 0c1f2af..74a09be 100644 --- a/src/tags/my_ut_hash.c +++ b/src/tags/my_ut_hash.c @@ -171,7 +171,7 @@ void tag_hash_key_init_with_fieldstat_tag(struct tag_hash_key *tag_key, const st } tag_key->hashv128 = cal_tag_hash_xxhash128(src, n_src, 0); - tag_key->hashv = tag_key->hashv128.high64 ^ tag_key->hashv128.low64; + tag_key->hashv = tag_key->hashv128.high64; if (deep_copy) { tag_key->tags = (struct fieldstat_tag *)malloc(sizeof(struct fieldstat_tag) * n_src); @@ -234,7 +234,7 @@ unsigned tag_hash_key_cal_hash_val(const struct tag_hash_key *tag, unsigned seed } XXH128_hash_t hashv = cal_tag_hash_xxhash128(tag->tags, tag->n_my_tag, seed); - return hashv.high64 ^ hashv.low64; + return hashv.high64; } void build_dynamic_cell_key(const struct fieldstat_tag tags[], size_t n_tags, char **out_key, size_t *out_key_size) diff --git a/test/test_merge.cpp b/test/test_merge.cpp index 2ac7e32..465cf18 100644 --- a/test/test_merge.cpp +++ b/test/test_merge.cpp @@ -434,7 +434,7 @@ TEST(unit_test_merge, merge_accuracy_test_gen_dest_full_all_inserted_given_src_f flows_in_dest.insert(flows_in_dest.end(), std::make_move_iterator(flows_in_src.begin()), std::make_move_iterator(flows_in_src.end())); double accuracy = test_cal_accuracy_given_expected_key(flows_in_dest, flows_in_merged); - EXPECT_TRUE(accuracy > 0.99); // should be 1.0 + EXPECT_GT(accuracy, 0.99); // should be 1.0 fieldstat_free(instance_src); fieldstat_free(instance_dest); @@ -466,7 +466,7 @@ TEST(unit_test_merge, merge_accuracy_test_gen_dest_full_some_inserted_and_some_m flows_in_dest.insert(flows_in_dest.end(), std::make_move_iterator(flows_in_src.begin()), std::make_move_iterator(flows_in_src.end())); double accuracy = test_cal_accuracy_given_expected_key(flows_in_dest, flows_in_merged); - EXPECT_TRUE(accuracy >= 0.93); // by heavy keeper benchmark, with K = 100, merging result should be about 0.96, for adding the flows will also cause some inaccuracy, so here we set 0.93 + EXPECT_GE(accuracy, 0.93); // by heavy keeper benchmark, with K = 100, merging result should be about 0.96, for adding the flows will also cause some inaccuracy, so here we set 0.93 printf("merge_accuracy_test_gen_dest_full_some_inserted_and_some_merged_and_some_fail_to_add accuracy is %lf\n", accuracy); fieldstat_free(instance_src); |
