From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3222E20E3E for ; Wed, 3 Jul 2019 19:27:43 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jxIU0iFKBT-X for ; Wed, 3 Jul 2019 19:27:43 -0400 (EDT) Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id E656824527 for ; Wed, 3 Jul 2019 19:27:42 -0400 (EDT) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH 4/5] swim: speed-up tests Date: Thu, 4 Jul 2019 01:28:33 +0200 Message-Id: <592ea53882b9d71450241be19fdd2eab5fc9bf4d.1562196102.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org With following patches some of the tests will work much slower due to significantly increased size of the most of packets. This commit tries to smooth it by * Turning off verbose logs in unit tests; * Using much more light version of UUID comparator. According to the profiler these places increase speed in a couple of times, and at the same time they are simple. Needed for #4253 --- src/lib/swim/swim.c | 4 ++-- test/unit/swim_test_utils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/swim/swim.c b/src/lib/swim/swim.c index 4f01d623a..e9f99015c 100644 --- a/src/lib/swim/swim.c +++ b/src/lib/swim/swim.c @@ -430,8 +430,8 @@ struct mh_swim_table_key { #define mh_arg_t void * #define mh_hash(a, arg) ((*a)->hash) #define mh_hash_key(a, arg) (a.hash) -#define mh_cmp(a, b, arg) (tt_uuid_compare(&(*a)->uuid, &(*b)->uuid)) -#define mh_cmp_key(a, b, arg) (tt_uuid_compare(a.uuid, &(*b)->uuid)) +#define mh_cmp(a, b, arg) (!tt_uuid_is_equal(&(*a)->uuid, &(*b)->uuid)) +#define mh_cmp_key(a, b, arg) (!tt_uuid_is_equal(a.uuid, &(*b)->uuid)) #define MH_SOURCE 1 #include "salad/mhash.h" diff --git a/test/unit/swim_test_utils.c b/test/unit/swim_test_utils.c index bfefcbaf9..7da82d93c 100644 --- a/test/unit/swim_test_utils.c +++ b/test/unit/swim_test_utils.c @@ -869,7 +869,7 @@ swim_run_test(const char *log_file, fiber_func test) int fd = open(log_file, O_TRUNC); if (fd != -1) close(fd); - say_logger_init(log_file, 6, 1, "plain", 0); + say_logger_init(log_file, 5, 1, "plain", 0); /* * Print the seed to be able to reproduce a bug with the * same seed. -- 2.20.1 (Apple Git-117)