aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_shingles_test.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-12 09:48:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-12 09:48:29 +0100
commit931615a2e0c1069c161bf2c9516732f576f20ee3 (patch)
tree9a195f6cc8da39dcc64eb8984189589e5a974f10 /test/rspamd_shingles_test.c
parent25db12ee3fce3a41c1fd907373ead67015cef6ed (diff)
downloadrspamd-931615a2e0c1069c161bf2c9516732f576f20ee3.tar.gz
rspamd-931615a2e0c1069c161bf2c9516732f576f20ee3.zip
[Feature] Further micro-optimizations for hashing and shingles
Diffstat (limited to 'test/rspamd_shingles_test.c')
-rw-r--r--test/rspamd_shingles_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/rspamd_shingles_test.c b/test/rspamd_shingles_test.c
index a4289497e..5669137d4 100644
--- a/test/rspamd_shingles_test.c
+++ b/test/rspamd_shingles_test.c
@@ -93,10 +93,10 @@ test_case (gsize cnt, gsize max_len, gdouble perm_factor,
ottery_rand_bytes (key, sizeof (key));
input = generate_fuzzy_words (cnt, max_len);
- ts1 = rspamd_get_ticks ();
+ ts1 = rspamd_get_virtual_ticks ();
sgl = rspamd_shingles_generate (input, key, NULL,
rspamd_shingles_default_filter, NULL, alg);
- ts2 = rspamd_get_ticks ();
+ ts2 = rspamd_get_virtual_ticks ();
permute_vector (input, perm_factor);
sgl_permuted = rspamd_shingles_generate (input, key, NULL,
rspamd_shingles_default_filter, NULL, alg);
@@ -118,7 +118,7 @@ rspamd_shingles_test_func (void)
{
enum rspamd_shingle_alg alg = RSPAMD_SHINGLES_OLD;
- for (alg = RSPAMD_SHINGLES_OLD; alg <= RSPAMD_SHINGLES_MUMHASH; alg ++) {
+ for (alg = RSPAMD_SHINGLES_OLD; alg <= RSPAMD_SHINGLES_FAST; alg ++) {
test_case (200, 10, 0.1, alg);
test_case (500, 20, 0.01, alg);
test_case (5000, 20, 0.01, alg);