aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rspamd_http_test.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/rspamd_http_test.c b/test/rspamd_http_test.c
index f4712b224..625eef7a7 100644
--- a/test/rspamd_http_test.c
+++ b/test/rspamd_http_test.c
@@ -126,7 +126,7 @@ rspamd_client_finish (struct rspamd_http_connection *conn,
struct client_cbdata *cb = conn->ud;
struct timespec ts;
- *(cb->lat) = rspamd_get_ticks () * 1000.;
+ *(cb->lat) = rspamd_get_ticks () * 1000. - cb->ts;
close (conn->fd);
rspamd_http_connection_unref (conn);
g_free (cb);
@@ -161,7 +161,7 @@ rspamd_http_client_func (const gchar *path, rspamd_inet_addr_t *addr,
}
cb = g_malloc (sizeof (*cb));
- cb->ts = rspamd_get_ticks ();
+ cb->ts = rspamd_get_ticks () * 1000.;
cb->lat = latency;
rspamd_http_connection_write_message (conn, msg, NULL, NULL, cb,
fd, NULL, ev_base);
@@ -241,7 +241,8 @@ rspamd_http_test_func (void)
exit (EXIT_SUCCESS);
}
- rspamd_mempool_lock_mutex (mtx);
+ //rspamd_mempool_lock_mutex (mtx);
+ usleep (100000);
/* Do client stuff */
for (i = 0; i < ntests; i ++) {
@@ -303,7 +304,8 @@ rspamd_http_test_func (void)
exit (EXIT_SUCCESS);
}
- rspamd_mempool_lock_mutex (mtx);
+ //rspamd_mempool_lock_mutex (mtx);
+ usleep (100000);
total_diff = 0.0;
for (i = 0; i < ntests; i ++) {