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

Perf/metrics #3634

Merged
merged 3 commits into from
Apr 22, 2022
Merged

Perf/metrics #3634

merged 3 commits into from
Apr 22, 2022

Conversation

NelsonVides
Copy link
Collaborator

As mentioned in slack, updating metrics is sanitising the host type name every single time, even, when metrics have been configured as global and the host type won’t be used for its name. So here we first don't even try to find out the prefix if after all we're using global, and then we precompute the prefixes in the config processing callback and simply fetch them.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #3634 (a7453fa) into master (6d1c24b) will decrease coverage by 3.39%.
The diff coverage is 84.21%.

❗ Current head a7453fa differs from pull request most recent head 660f4dd. Consider uploading reports for the commit 660f4dd to get more accurate results

@@            Coverage Diff             @@
##           master    #3634      +/-   ##
==========================================
- Coverage   81.03%   77.64%   -3.40%     
==========================================
  Files         427      427              
  Lines       31962    31954       -8     
==========================================
- Hits        25901    24810    -1091     
- Misses       6061     7144    +1083     
Impacted Files Coverage Δ
src/metrics/mongoose_metrics.erl 80.97% <84.21%> (-11.47%) ⬇️
src/mongoose_api_client.erl 0.00% <0.00%> (-82.70%) ⬇️
src/auth/ejabberd_auth_http.erl 0.99% <0.00%> (-74.26%) ⬇️
src/auth/ejabberd_auth_jwt.erl 7.69% <0.00%> (-71.80%) ⬇️
src/auth/extauth.erl 0.00% <0.00%> (-62.72%) ⬇️
src/ejabberd_commands.erl 26.02% <0.00%> (-61.65%) ⬇️
src/mod_cowboy.erl 0.00% <0.00%> (-51.95%) ⬇️
src/mongoose_ldap_config.erl 50.00% <0.00%> (-50.00%) ⬇️
src/acl.erl 43.90% <0.00%> (-48.79%) ⬇️
src/mod_bosh_mnesia.erl 54.54% <0.00%> (-45.46%) ⬇️
... and 133 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 6d1c24b...660f4dd. Read the comment docs.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Apr 22, 2022

small_tests_24 / small_tests / 660f4dd
Reports root / small


small_tests_23 / small_tests / 660f4dd
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 660f4dd
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 660f4dd
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 660f4dd
Reports root/ big
OK: 2843 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 660f4dd
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 660f4dd
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 660f4dd
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 660f4dd
Reports root/ big
OK: 1547 / Failed: 0 / User-skipped: 360 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 660f4dd
Reports root/ big
OK: 3234 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 660f4dd
Reports root/ big
OK: 1854 / Failed: 0 / User-skipped: 368 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 660f4dd
Reports root/ big
OK: 3234 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 660f4dd
Reports root/ big
OK: 3234 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 660f4dd
Reports root/ big
OK: 3229 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 660f4dd
Reports root/ big
OK: 1697 / Failed: 0 / User-skipped: 367 / Auto-skipped: 0

@NelsonVides NelsonVides marked this pull request as ready for review April 22, 2022 13:01
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me 👍

@chrzaszcz chrzaszcz merged commit 5f4a473 into master Apr 22, 2022
@chrzaszcz chrzaszcz deleted the perf/metrics branch April 22, 2022 13:05
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 2022
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.

4 participants