This diff will generate module rabbit_framing_amqp_0_9_1 with
re-ordered clauses of function decode_method_fields/2.
After this change, basic class will be at the top of the function
clauses. That's better because for example basic.publish and basic.ack
are called far more often than for example methods of class connection,
channel or exchange.
Note that "the compiler does not rearrange clauses that match binaries."
See https://www.erlang.org/doc/efficiency_guide/functions.html#pattern-matching
Measurement taken on an Ubuntu 20.04 VM before and after this change:
1. Install latest Erlang from master (i.e. Erlang 25)
2. RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+JPperf true +S 1" make run-broker
(Single scheduler makes the flame graph easier to read.)
3. Run rabbitmq-perf-test without any parameters
4. sudo perf record -g -F 9999 -p <pid> -- sleep 5
where <pid> is the output of 'os:getpid().' (in the Erlang shell).
This samples CPU stack traces via frame pointers of
rabbitmq-server at 9999 Hertz for 5 seconds.
5. Generate a differential flame graph as described in
https://www.brendangregg.com/blog/2014-11-09/differential-flame-graphs.html
Before this change, stack frame rabbit_framing_amqp_0_9_1:decode_method_fields/2
was 1.57% present in all stack trackes, most of the time (> 1%) running
on the CPU, i.e. directly consuming CPU cycles.
This does not sound like a lot, but is actually quite a lot for a single
function!
The diffential flame graph depicts a single dark blue frame: function decode_method_fields
with a reduction of ~0.85%.
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
So that clients with expiring credentials/secrets,
such as those using JWT/OAuth 2.0 tokens, would have
a chance to provide updated credentials (e.g.
a new JWT token) to the server without reconnecting.
Pair: @gerhard.
Per discussion with @acogoluegnes.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# Fixed URLs
## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.
* http://www.amqp.org/schema/amqp.xsd (404) with 5 occurrences migrated to:
https://www.amqp.org/schema/amqp.xsd ([https](https://www.amqp.org/schema/amqp.xsd) result 404).