-
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
Skip pretty-printing of unused accumulator field #3637
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3637 +/- ##
==========================================
+ Coverage 80.99% 81.00% +0.01%
==========================================
Files 427 427
Lines 31965 31965
==========================================
+ Hits 25889 25894 +5
+ Misses 6076 6071 -5
Continue to review full report at Codecov.
|
This comment was marked as outdated.
This comment was marked as outdated.
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.
Honestly, I think this is a complication. There shouldn't be a tuple with a function in a field called origin_stanza
.
So should we remove this field instead? This
|
The whole point was to have the original stanza in the Acc for debugging - to be able to find out how it looked like before it was changed by the server. I think that What I don't understand is why the |
a20f89e
to
21e287e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
By now we have a pretty printer in the logger, and creating accumulators is a hot operation, so we can skip this field when it is not needed.
21e287e
to
6189d6d
Compare
small_tests_23 / small_tests / 6189d6d small_tests_24 / small_tests / 6189d6d dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 6189d6d dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6189d6d ldap_mnesia_23 / ldap_mnesia / 6189d6d dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 6189d6d dynamic_domains_mysql_redis_24 / mysql_redis / 6189d6d ldap_mnesia_24 / ldap_mnesia / 6189d6d internal_mnesia_24 / internal_mnesia / 6189d6d pgsql_mnesia_23 / pgsql_mnesia / 6189d6d elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 6189d6d pgsql_mnesia_24 / pgsql_mnesia / 6189d6d mysql_redis_24 / mysql_redis / 6189d6d mssql_mnesia_24 / odbc_mssql_mnesia / 6189d6d riak_mnesia_24 / riak_mnesia / 6189d6d |
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.
Good 👍
@@ -346,21 +346,18 @@ large_event_dont_crash_formatter(_Config) -> | |||
%% | |||
|
|||
example_acc(Body) -> | |||
Elem = {xmlel, <<"message">>, | |||
[{<<"type">>, <<"chat">>}, {<<"id">>, <<"1111">>}], | |||
[{xmlel, <<"body">>,[], [{xmlcdata, Body}]}]}, |
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.
Very nit-picky, I can merge as it is.
[{xmlel, <<"body">>,[], [{xmlcdata, Body}]}]}, | |
[{xmlel, <<"body">>, [], [{xmlcdata, Body}]}]}, |
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.
Hmmmm I think we can spare an extra CI run here, there were no spaces before, I tried adding them and missed one... 😅
Another low-hanging fruit. This field is actually never used anywhere in MongooseIM code
so it could even be dropped altogether, but at the very least we can just skip the to_binary until it is used, if ever, and in the logger we now have selective pretty-printers, so we can drop it altogether.