diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-17 17:37:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-17 17:37:09 +0100 |
commit | d00fbcbff7ac59e772c7df321949ee5a11b5baf3 (patch) | |
tree | 662aa14fd0ee0776016be784a69fa959b25d2504 /test/rspamd_radix_test.c | |
parent | e4846184c2f4dbdaefd18da8fc11c2864ae67c76 (diff) | |
download | rspamd-d00fbcbff7ac59e772c7df321949ee5a11b5baf3.tar.gz rspamd-d00fbcbff7ac59e772c7df321949ee5a11b5baf3.zip |
Select more limited range of masks.
Diffstat (limited to 'test/rspamd_radix_test.c')
-rw-r--r-- | test/rspamd_radix_test.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/rspamd_radix_test.c b/test/rspamd_radix_test.c index 754e79dbf..389e6f523 100644 --- a/test/rspamd_radix_test.c +++ b/test/rspamd_radix_test.c @@ -26,7 +26,15 @@ #include "radix.h" #include "ottery.h" -const gsize max_elts = 3 * 1024 * 1024; +const gsize max_elts = 1 * 1024 * 1024; + +const uint masks[] = { + 8, + 16, + 24, + 32, + 27 +}; struct _tv { const char *ip; @@ -129,7 +137,7 @@ rspamd_radix_test_func (void) for (i = 0; i < nelts; i ++) { addrs[i].addr = ottery_rand_uint32 (); - addrs[i].mask = ottery_rand_range (32); + addrs[i].mask = masks[ottery_rand_range(G_N_ELEMENTS (masks) - 1)]; } msg_info ("old radix performance (%z elts)", nelts); |