-
Notifications
You must be signed in to change notification settings - Fork 428
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
Put hooks into persistent_term using batching #3878
Conversation
6674e33
to
272b31e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3878 +/- ##
==========================================
+ Coverage 83.86% 83.94% +0.07%
==========================================
Files 551 551
Lines 33583 33589 +6
==========================================
+ Hits 28166 28197 +31
+ Misses 5417 5392 -25
☔ View full report in Codecov by Sentry. |
An example of a profile with perf profiling for 60 seconds: |
e0aa7e3
to
4a05899
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4a05899
to
cc36f34
Compare
This comment was marked as outdated.
This comment was marked as outdated.
cc36f34
to
ed62983
Compare
This comment was marked as outdated.
This comment was marked as outdated.
ed62983
to
f2a9953
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f2a9953
to
6dffa7f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6dffa7f
to
aef976a
Compare
To choose between this one and #4074 |
This comment was marked as outdated.
This comment was marked as outdated.
25fa007
to
c47348f
Compare
aef976a
to
a0a5d35
Compare
This comment was marked as outdated.
This comment was marked as outdated.
a0a5d35
to
24a6a3c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
24a6a3c
to
c0d1a15
Compare
This comment was marked as outdated.
This comment was marked as outdated.
c0d1a15
to
c6b0241
Compare
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / c6b0241 small_tests_24 / small_tests / c6b0241 small_tests_25_arm64 / small_tests / c6b0241 small_tests_25 / small_tests / c6b0241 ldap_mnesia_24 / ldap_mnesia / c6b0241 ldap_mnesia_25 / ldap_mnesia / c6b0241 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / c6b0241 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / c6b0241 dynamic_domains_mysql_redis_25 / mysql_redis / c6b0241 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / c6b0241 internal_mnesia_25 / internal_mnesia / c6b0241 pgsql_cets_25 / pgsql_cets / c6b0241 pgsql_mnesia_25 / pgsql_mnesia / c6b0241 mysql_redis_25 / mysql_redis / c6b0241 pgsql_mnesia_24 / pgsql_mnesia / c6b0241 mssql_mnesia_25 / odbc_mssql_mnesia / c6b0241 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making all the changes. This version looks best to me 👍
c6b0241
to
6652234
Compare
elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 6652234 small_tests_24 / small_tests / 6652234 small_tests_25 / small_tests / 6652234 small_tests_25_arm64 / small_tests / 6652234 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6652234 ldap_mnesia_24 / ldap_mnesia / 6652234 dynamic_domains_mysql_redis_25 / mysql_redis / 6652234 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 6652234 ldap_mnesia_25 / ldap_mnesia / 6652234 service_mongoose_system_metrics_SUITE:all_clustered_mongooses_report_the_same_client_id{skip,
{failed,
{service_mongoose_system_metrics_SUITE,init_per_testcase,
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 30000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{distributed_helper,add_node_to_cluster,2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,29}]},
{service_mongoose_system_metrics_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
{line,113}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_lookup_works{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_lookup_not_found{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_cannot_insert_static{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_cannot_disable_static{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_cannot_enable_static{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_get_all_static{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:api_get_domains_by_host_type{skip,
{failed,
{service_domain_db_SUITE,init_per_testcase,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[[],
[<<"mim2only">>,<<"type1">>,<<"type2">>,<<"dummy auth">>,
<<"dbgroup">>,<<"dbgroup2">>,<<"cfggroup">>]]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,3,
[{file,
"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,33}]},
{service_domain_db_SUITE,setup_service,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,287}]},
{service_domain_db_SUITE,init_per_testcase,2,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,239}]},
{test_server,do_init_per_testcase,2,
[{file,"test_server.erl"},{line,1552}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1253}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}}}} service_domain_db_SUITE:end_per_suite{error,
{{badrpc,
{'EXIT',
{noproc,
{gen_server,call,
[mongoose_domain_sup,
{terminate_child,mongoose_domain_core},
infinity]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost},
mongoose_domain_sup,restart_core,
[[]]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{domain_helper,restart_domain_core,1,
[{file,"/home/circleci/project/big_tests/tests/domain_helper.erl"},
{line,30}]},
{service_domain_db_SUITE,'-end_per_suite/1-lc$^0/1-0-',1,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,190}]},
{service_domain_db_SUITE,end_per_suite,1,
[{file,
"/home/circleci/project/big_tests/tests/service_domain_db_SUITE.erl"},
{line,190}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1379}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} dynamic_domains_SUITE:init_per_suite{'EXIT',
{{badrpc,timeout},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 30000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{distributed_helper,add_node_to_cluster,2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,29}]},
{dynamic_domains_SUITE,cluster_nodes,2,
[{file,
"/home/circleci/project/big_tests/tests/dynamic_domains_SUITE.erl"},
{line,210}]},
{dynamic_domains_SUITE,init_per_suite,1,
[{file,
"/home/circleci/project/big_tests/tests/dynamic_domains_SUITE.erl"},
{line,32}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1379}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} local_iq_SUITE:init_per_suite{'EXIT',{{badrpc,timeout},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,
timeout => 30000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{distributed_helper,add_node_to_cluster,2,
[{file,"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,29}]},
{local_iq_SUITE,init_per_suite,1,
[{file,"/home/circleci/project/big_tests/tests/local_iq_SUITE.erl"},
{line,29}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1379}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 6652234 pgsql_cets_25 / pgsql_cets / 6652234 pgsql_mnesia_25 / pgsql_mnesia / 6652234 pgsql_mnesia_24 / pgsql_mnesia / 6652234 internal_mnesia_25 / internal_mnesia / 6652234 mssql_mnesia_25 / odbc_mssql_mnesia / 6652234 small_tests_25_arm64 / small_tests / 6652234 ldap_mnesia_25 / ldap_mnesia / 6652234 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Optimising hooks, as every hook execution means copying a list of handler from the ets table, having them into persistent terms means faster access to super frequently used values: no copying, no GC, and keeping code hotter for memory caching.
gen_hook
accumulates the handlers on an internal state, and does not dump into PT until explicitly requested (at the end of app startup). If any more handlers are added or removed afterwards, PT entry is updated immediately (this keeps tests easier).Perhaps #4074 is preferred, needs to be discussed.