Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BA9918977 for ; Tue, 13 Oct 2015 19:23:55 +0000 (UTC) Received: (qmail 23583 invoked by uid 500); 13 Oct 2015 19:23:33 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 23533 invoked by uid 500); 13 Oct 2015 19:23:33 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 23524 invoked by uid 99); 13 Oct 2015 19:23:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2015 19:23:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E4013DFF13; Tue, 13 Oct 2015 19:23:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: couchdb-khash git commit: Remove flaky eunit test. Date: Tue, 13 Oct 2015 19:23:32 +0000 (UTC) Repository: couchdb-khash Updated Branches: refs/heads/master fc1a80fe3 -> 7c6a9cd97 Remove flaky eunit test. This test is a race benchmark to prove khash is faster than dict. It was used in early stages of development. In the context of eunit tests it has the potential to fail occasionally and make test suite results unreliable. COUCHDB-2848 Project: http://git-wip-us.apache.org/repos/asf/couchdb-khash/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-khash/commit/7c6a9cd9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-khash/tree/7c6a9cd9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-khash/diff/7c6a9cd9 Branch: refs/heads/master Commit: 7c6a9cd9776b5c6f063ccafedfa984b00877b019 Parents: fc1a80f Author: Nick Vatamaniuc Authored: Mon Oct 12 12:49:25 2015 -0400 Committer: Nick Vatamaniuc Committed: Mon Oct 12 13:20:39 2015 -0400 ---------------------------------------------------------------------- test/khash_test.erl | 57 ------------------------------------------------ 1 file changed, 57 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-khash/blob/7c6a9cd9/test/khash_test.erl ---------------------------------------------------------------------- diff --git a/test/khash_test.erl b/test/khash_test.erl index d1bb9e2..cc7a429 100644 --- a/test/khash_test.erl +++ b/test/khash_test.erl @@ -107,39 +107,6 @@ randomized_test_() -> } }. -compare_dict_test_() -> - { - "khash vs dict", - {setup, - fun() -> - % Let the VM settle for a bit - receive after 1000 -> ok end - end, - fun(ok) -> - [{timeout, ?TIMEOUT, { - "Dict's fetch is slower than of khash", - ?_test(begin - {DTime, _} = timer:tc(fun() -> dict_fetch() end, []), - {KTime, _} = timer:tc(fun() -> khash_fetch() end, []), - ?debugFmt("Dict: ~10b", [DTime]), - ?debugFmt("KHash: ~10b", [KTime]), - ?assert(DTime > KTime) - end) - }}, - {timeout, ?TIMEOUT, { - "Dict's store is slower than of khash", - ?_test(begin - {DTime, _} = timer:tc(fun() -> dict_store() end, []), - {KTime, _} = timer:tc(fun() -> khash_store() end, []), - ?debugFmt("Dict: ~10b", [DTime]), - ?debugFmt("KHash: ~10b", [KTime]), - ?assert(DTime > KTime) - end) - }}] - end - } - }. - basic_iterators_test_() -> { "khash itrators basics operations", @@ -286,19 +253,6 @@ no_expiration_iterators_test_() -> } }. - -dict_fetch() -> - erlang:garbage_collect(), - List = kv_data(?NUM_KVS), - Dict = dict:from_list(List), - dict_fetch(Dict, ?NUM_CYCLES * 10). - -dict_fetch(_, 0) -> - ok; -dict_fetch(Dict, NumCycles) -> - ?assertMatch(1, dict:fetch(1, Dict)), - dict_fetch(Dict, NumCycles - 1). - khash_fetch() -> erlang:garbage_collect(), List = kv_data(?NUM_KVS), @@ -311,17 +265,6 @@ khash_fetch(KHash, NumCycles) -> ?assertMatch(1, khash:get(KHash, 1)), khash_fetch(KHash, NumCycles - 1). -dict_store() -> - List = kv_data(?NUM_KVS * 2), - Dict = dict:from_list(List), - dict_store(Dict, ?NUM_CYCLES). - -dict_store(_, 0) -> - ok; -dict_store(Dict, NumCycles) -> - Dict2 = dict:store(1, 1, Dict), - dict_store(Dict2, NumCycles - 1). - khash_store() -> List = kv_data(?NUM_KVS * 2), {ok, KHash} = khash:from_list(List),