From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: kostja@tarantool.org Subject: [tarantool-patches] [PATCH 4/5] swim: speed-up tests Date: Thu, 4 Jul 2019 01:28:33 +0200 [thread overview] Message-ID: <592ea53882b9d71450241be19fdd2eab5fc9bf4d.1562196102.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1562196102.git.v.shpilevoy@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)
next prev parent reply other threads:[~2019-07-03 23:27 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-03 23:28 [tarantool-patches] [PATCH 0/5] SWIM loglog preparation Vladislav Shpilevoy 2019-07-03 23:28 ` [tarantool-patches] [PATCH 1/5] swim: fix flaky 'indirect pings' test Vladislav Shpilevoy 2019-07-04 8:20 ` [tarantool-patches] " Konstantin Osipov 2019-07-03 23:28 ` [tarantool-patches] [PATCH 2/5] swim: sadly remove cache Vladislav Shpilevoy 2019-07-04 8:22 ` [tarantool-patches] " Konstantin Osipov 2019-07-03 23:28 ` [tarantool-patches] [PATCH 3/5] test: redo some swim tests using error injections Vladislav Shpilevoy 2019-07-04 8:23 ` [tarantool-patches] " Konstantin Osipov 2019-07-03 23:28 ` Vladislav Shpilevoy [this message] 2019-07-04 8:24 ` [tarantool-patches] Re: [PATCH 4/5] swim: speed-up tests Konstantin Osipov 2019-07-03 23:28 ` [tarantool-patches] [PATCH 5/5] swim: speed-up empty payloads cluster bootstrap Vladislav Shpilevoy 2019-07-04 8:26 ` [tarantool-patches] " Konstantin Osipov 2019-07-05 22:44 ` [tarantool-patches] Re: [PATCH 0/5] SWIM loglog preparation Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=592ea53882b9d71450241be19fdd2eab5fc9bf4d.1562196102.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH 4/5] swim: speed-up tests' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox