Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache found behaviour implementations #2323

Merged

Conversation

DenysGonchar
Copy link
Collaborator

@DenysGonchar DenysGonchar commented May 28, 2019

tested manually:

  • build and run MIM:
make rel
_build/prod/rel/mongooseim/bin/mongooseim live
  • run mongoose_lid:find_behaviour_implementations/1 few times, notice dramatic decrease of execution time:
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
  • disable service_cache and repeat the test:
mongoose_service:stop_service(service_cache).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
  • re-enable service_cache and repeat the test:
mongoose_service:start_service(service_cache,[]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).
timer:tc(mongoose_lib, find_behaviour_implementations, [mongoose_service]).

@mongoose-im
Copy link
Collaborator

mongoose-im commented May 29, 2019

6630.1 / Erlang 19.3 / small_tests / 21d23fe
Reports root / small


6630.2 / Erlang 19.3 / internal_mnesia / 21d23fe
Reports root/ big
OK: 1263 / Failed: 2 / User-skipped: 94 / Auto-skipped: 0

sm_SUITE:parallel:subscription_requests_are_buffered_properly
{error,{{badmatch,false},
    [{escalus_session,stream_management,2,
              [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
               {line,227}]},
     {escalus_connection,connection_step,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,134}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
     {escalus_connection,start,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,118}]},
     {sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
           [{file,"sm_SUITE.erl"},{line,848}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1045}]}]}}

Report log

sm_SUITE:parallel_manual_ack_freq_1:resume_session_state_stop_c2s
{error,{{assertion_failed,assert_many,true,
              [is_presence,#Fun<sm_SUITE.16.86460923>],
              [{xmlel,<<"presence">>,
                  [{<<"from">>,
                  <<"alicE14.669063@localhost/escalus-default-resource">>},
                   {<<"to">>,
                  <<"alice14.669063@localhost/escalus-default-resource">>},
                   {<<"xml:lang">>,<<"en">>}],
                  []},
               {xmlel,<<"presence">>,
                  [{<<"from">>,
                  <<"alicE14.669063@localhost/escalus-default-resource">>},
                   {<<"to">>,
                  <<"alice14.669063@localhost/escalus-default-resource">>},
                   {<<"xml:lang">>,<<"en">>}],
                  []}],
              "   <presence from='alicE14.669063@localhost/escalus-default-resource' to='alice14.669063@localhost/escalus-default-resource' xml:lang='en'/>   <presence from='alicE14.669063@localhost/escalus-default-resource' to='alice14.669063@localhost/escalus-default-resource' xml:lang='en'/>"},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {sm_SUITE,resume_session_state_stop_c2s,1,
           [{file,"sm_SUITE.erl"},{line,581}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1045}]},
     {...

Report log


6630.3 / Erlang 19.3 / mysql_redis / 21d23fe
Reports root/ big
OK: 3130 / Failed: 1 / User-skipped: 250 / Auto-skipped: 0

pubsub_SUITE:dag+collection:retrieve_subscriptions_collection_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE88.156890@localhost/res1">>,escalus_tcp,
          <0.13992.3>,
          [{event_manager,<0.13953.3>},
           {server,<<"localhost">>},
           {username,<<"alicE88.156890">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.13953.3>},
            {server,<<"localhost">>},
            {username,<<"alicE88.156890">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE88.156890">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE88.156890">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"CEEB9FE694B568F2">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_response,3,
       [{file,"pubsub_tools.erl"},{line,457}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"pubsub_tools.erl"},{line,448}]},
     {pubsub_SUITE,'-retrieve_subscriptions_collection_test/1-fun-0-',2,
       [{file,"pubsub_SUITE.erl"},{line,1431}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_...

Report log


6630.4 / Erlang 19.3 / odbc_mssql_mnesia / 21d23fe
Reports root/ big
OK: 3119 / Failed: 0 / User-skipped: 248 / Auto-skipped: 0


6630.6 / Erlang 19.3 / elasticsearch_and_cassandra_mnesia / 21d23fe
Reports root/ big
OK: 510 / Failed: 0 / User-skipped: 27 / Auto-skipped: 0


6630.5 / Erlang 19.3 / ldap_mnesia / 21d23fe
Reports root/ big
OK: 1195 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


6630.8 / Erlang 21.3 / pgsql_mnesia / 21d23fe
Reports root/ big / small
OK: 3151 / Failed: 0 / User-skipped: 216 / Auto-skipped: 0


6630.9 / Erlang 21.3 / riak_mnesia / 21d23fe
Reports root/ big / small
OK: 1477 / Failed: 0 / User-skipped: 84 / Auto-skipped: 0


6630.1 / Erlang 19.3 / small_tests / 21d23fe
Reports root / small


6630.1 / Erlang 19.3 / small_tests / 21d23fe
Reports root / small


6630.8 / Erlang 21.3 / pgsql_mnesia / 21d23fe
Reports root/ big / small
OK: 3163 / Failed: 0 / User-skipped: 216 / Auto-skipped: 0


6630.9 / Erlang 21.3 / riak_mnesia / 21d23fe
Reports root/ big / small
OK: 1477 / Failed: 0 / User-skipped: 96 / Auto-skipped: 0

@DenysGonchar DenysGonchar changed the base branch from gdpr-remove-vcard to gdpr_mam_muc_schema_change May 29, 2019 18:00
@DenysGonchar DenysGonchar force-pushed the gdpr_mam_muc_schema_change branch 2 times, most recently from 71dab2b to 9b40943 Compare May 30, 2019 02:37
@DenysGonchar DenysGonchar force-pushed the cache-found-behaviour-implementations branch from c553268 to b4db6b0 Compare June 4, 2019 09:12
@codecov
Copy link

codecov bot commented Jun 4, 2019

Codecov Report

Merging #2323 into gdpr_mam_muc_schema_change will increase coverage by 53.94%.
The diff coverage is 100%.

Impacted file tree graph

@@                       Coverage Diff                       @@
##           gdpr_mam_muc_schema_change    #2323       +/-   ##
===============================================================
+ Coverage                       18.18%   72.13%   +53.94%     
===============================================================
  Files                             334      334               
  Lines                           29210    29166       -44     
===============================================================
+ Hits                             5313    21039    +15726     
+ Misses                          23897     8127    -15770
Impacted Files Coverage Δ
src/service_cache.erl 100% <100%> (ø)
src/admin_extra/service_admin_extra.erl 100% <100%> (+100%) ⬆️
src/mongoose_lib.erl 77.41% <100%> (+52.41%) ⬆️
src/mod_keystore.erl 0% <0%> (-91.67%) ⬇️
src/mod_revproxy.erl 0% <0%> (-89.81%) ⬇️
src/auth/ejabberd_auth_jwt.erl 0% <0%> (-89.14%) ⬇️
src/wpool/mongoose_wpool_riak.erl 0% <0%> (-85%) ⬇️
src/mongoose_api_client.erl 0% <0%> (-84.32%) ⬇️
src/mod_keystore_mnesia.erl 0% <0%> (-78.58%) ⬇️
src/auth/ejabberd_auth_http.erl 0% <0%> (-73.69%) ⬇️
... and 296 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9b7605...b4db6b0. Read the comment docs.

@DenysGonchar DenysGonchar merged commit 58c2e28 into gdpr_mam_muc_schema_change Jun 4, 2019
@DenysGonchar DenysGonchar deleted the cache-found-behaviour-implementations branch June 4, 2019 09:45
@fenek fenek added this to the MongooseIM 3.3.0++ milestone Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants