aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_encoding.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-26 14:16:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-26 14:26:41 +0100
commita472769a452f50aa76cfd436b6919e300b55e8f1 (patch)
tree3b0474ab6479c0c21a1e7aa259446c6796685885 /src/libmime/mime_encoding.c
parent99f067d9baf9c5141de5d24204d82008363cc78d (diff)
downloadrspamd-a472769a452f50aa76cfd436b6919e300b55e8f1.tar.gz
rspamd-a472769a452f50aa76cfd436b6919e300b55e8f1.zip
[Minor] Improve virtual ticks obtaining methods
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r--src/libmime/mime_encoding.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index 0aec2d5c0..2f0df38eb 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -651,7 +651,9 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
GByteArray *part_content;
rspamd_ftok_t charset_tok;
struct rspamd_mime_part *part = text_part->mime_part;
+ gdouble t1, t2;
+ t1 = rspamd_get_ticks (TRUE);
if (rspamd_str_has_8bit (text_part->raw.begin, text_part->raw.len)) {
text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_8BIT;
}
@@ -727,6 +729,8 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
rspamd_mime_text_part_ucs_from_utf (task, text_part);
rspamd_mime_text_part_normalise (task, text_part);
rspamd_mime_text_part_maybe_renormalise (task, text_part);
+ t2 = rspamd_get_ticks (TRUE);
+ msg_err_task ("conversion time: %.0f ticks", t2 - t1);
return;
}
@@ -748,4 +752,6 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
}
SET_PART_UTF (text_part);
+ t2 = rspamd_get_ticks (TRUE);
+ msg_err_task ("conversion time: %.0f ticks", t2 - t1);
}