I noticed that the Delay node in rate x msg / x unit time mode doesn't work as my intended.
For example, if set to 10 msg/10s it gives 1 msg/1s instead of 10 msg in 10s.
Another example, 5 msg/10s gives 1 msg/2s instead of a maximum of 5 messages every 10s.
I made a fix on my node-red with the corresponding test fixes.
This fix causes a change in the behavior of this node in rate mode with drop and without drop.
The difference is what happens if the messages come in bursts. So suppose (with 10msg/10 sec) that 5 messages arrive at time = 0, then another 5 at time = 9.9 seconds. Then the second five should (arguably) all be released immediately as there have been less than 10 messages in the last 10 seconds.
Note that the node is behaving correctly according to the help text, where is says:
"When configured to rate limit messages, their delivery is spread across the configured time period."
That says that the 5 messages should be spread across the 10 seconds, so one every 2 seconds, which is what the node is doing.
So your mod would be a change, not a bug fix.