diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-07 18:08:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-07 18:08:55 +0100 |
commit | 2f221e03ee2f293d2b26c7423e343b753a8d8e72 (patch) | |
tree | 17e84c03b55f063e8463f3d7c9a6c5426a6fc0e3 /test/rspamd_http_test.c | |
parent | 8d5bad6c886d845666575e89c5463001a77bd527 (diff) | |
download | rspamd-2f221e03ee2f293d2b26c7423e343b753a8d8e72.tar.gz rspamd-2f221e03ee2f293d2b26c7423e343b753a8d8e72.zip |
Fix http test.
Diffstat (limited to 'test/rspamd_http_test.c')
-rw-r--r-- | test/rspamd_http_test.c | 10 |
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 ++) { |