X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_hash.c;h=accf3c1ab1ff76a0e37b876da268ba690122e916;hp=3c7cc350d4d02ef7a200893ec2843d2349e1024c;hb=495913bfaec0ff19107f0cc903ba1d6eade03709;hpb=20adf7802bcec449566b9cbb900504fd409f62db diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index 3c7cc35..accf3c1 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -114,6 +114,7 @@ unsigned long init_pool_size = DEFAULT_RAND_POOL, lookup_pool_size = DEFAULT_RAND_POOL, write_pool_size = DEFAULT_RAND_POOL; int validate_lookup; +unsigned long nr_hash_chains; /* 0: normal table, other: number of hash chains */ int count_pipe[2]; @@ -290,6 +291,7 @@ printf(" [not -u nor -s] Add entries (supports redundant keys).\n"); printf(" [-O size] Init pool size.\n"); printf(" [-V] Validate lookups of init values (use with filled init pool, same lookup range, with different write range).\n"); printf(" [-U] Uniqueness test.\n"); + printf(" [-C] Number of hash chains.\n"); printf("\n\n"); } @@ -456,6 +458,9 @@ int main(int argc, char **argv) case 'U': test_choice = TEST_HASH_UNIQUE; break; + case 'C': + nr_hash_chains = atol(argv[++i]); + break; } } @@ -528,6 +533,8 @@ int main(int argc, char **argv) lookup_pool_offset, lookup_pool_size); printf_verbose("Update pool size offset %lu size %lu.\n", write_pool_offset, write_pool_size); + printf_verbose("Number of hash chains: %lu.\n", + nr_hash_chains); printf_verbose("thread %-6s, thread id : %lx, tid %lu\n", "main", pthread_self(), (unsigned long)gettid());