Kim Alvefur
cdffc6aac2
mod_csi_simple: Provide custom set of timing buckets
...
The default of 0.001..100.0 did not feel suitable here. This might be
better. Longer is better and hold times less than a few seconds is
generally undesirable.
4 years ago
Kim Alvefur
b8779399f6
mod_csi_simple: Consider XEP-0353: Jingle Message Initiation important
...
Improves experience with VoIP calls initiated via JMI
Closes #1548
6 years ago
Jonas Schäfer
93a2f1559d
mod_csi_simple: convert to use new metric interface for flush reasons
5 years ago
Kim Alvefur
89ec64ff89
mod_csi_simple: s/algoritm/algorithm/ [codespell]
5 years ago
Kim Alvefur
40252c2cc7
mod_csi_simple: Add command to test importance algorithm on stream of stanzas
...
This won't include behavior provided by extra modules tho.
5 years ago
Kim Alvefur
51b055809a
mod_csi_simple: Fire event when flushing queue
...
To let other plugins know and take some action, e.g. flushing other
buffers or whatnot.
5 years ago
Kim Alvefur
dcab373f45
mod_csi_simple: Set session state to 'flushing' while doing so
...
May be useful for 3rd party modules.
5 years ago
Kim Alvefur
cb1282bfd0
mod_csi_simple,mod_carbons,mod_mam: Update comment about XEP-0353
...
It went back to Deferred
5 years ago
Kim Alvefur
e856c00107
mod_csi_simple: Report whatever's not a stirng and not a stanza
...
This is either dead code or actually a type error, but catching that
should be the responsibility of the session.send function. This type
check is left since everything after it assumes a stanza object.
These last few commits aren't meant to change any behavior and it did
mark things not stanzas as important, but those would have been mostly
raw strings which are now specially handled.
6 years ago
Kim Alvefur
c34f2c9ebf
mod_csi_simple: Report whitespace keepalives
...
Single space character is sent by mod_c2s when a session has been
silent for some time. This should account for the vast majority of raw
strings passing through here. If this is not the case then having stats
to say otherwise will be interesting.
6 years ago
Kim Alvefur
9b7ab06ef3
mod_csi_simple: Identify raw string data in logging and stats
6 years ago
Kim Alvefur
d4c1384269
mod_csi_simple: Collect stats on flush reasons
6 years ago
Kim Alvefur
edd5966062
mod_csi_simple: Record stats of how long buffers are held
...
Telnet command `stats:show("buffer_hold"):histogram()` looks nice!
6 years ago
Kim Alvefur
4053cca7dc
mod_csi_simple: Change debug message of client-triggered flush for coherence
...
It now matches other the other source of flush reason logging.
6 years ago
Kim Alvefur
e1a3982654
mod_csi_simple: Reset queue counter to zero when enabling
...
For symmetry.
6 years ago
Kim Alvefur
859c3650e5
mod_csi_simple: Forget queue counter when disabling optimizations
...
Otherwise it might not start from zero when enabled again.
6 years ago
Kim Alvefur
cabd89913a
mod_csi_simple: Fix flushing when client sent something
...
Forgot to unset the flag afterwards, so it would only work once.
The flag is not even needed, it works as intended without it.
6 years ago
Kim Alvefur
749ed917c1
mod_csi_simple: Fix treating presence errors as presence updates
...
Autocomplete fail probably.
6 years ago
Kim Alvefur
ade3caf1ad
mod_csi_simple: Add comment highlighting that XEP-0353 is experimental
...
To make it easier to find implemented Experimental XEPs later. Also at
the time of this commit it has been Proposed as mentinoed in the
comment but hopefully that will be resolved soon.
6 years ago
Kim Alvefur
fc8a50cd73
mod_csi_simple: Fix unintentional order of rules from merge
6 years ago
Kim Alvefur
b2baba1124
mod_csi_simple: Log reasons for not flushing
6 years ago
Kim Alvefur
a9ba50343c
mod_csi_simple: Add short reasons to report
...
Should improve quality of debug logs
6 years ago
Kim Alvefur
44847d620c
mod_csi_simple: Refactor to allow logging reason for buffer flush
...
Same style as mod_mam and mod_carbons allows easy comparison.
BC: Log format changes
6 years ago
Kim Alvefur
9339ebb8e3
mod_csi_simple: Don't consider presence errors as important
...
A large share of `<presence type=error>` appears to be noise from large
public channels and failed presence probes. The later at least should
count as presence updates, which are currently considered unimportant.
See also 8cecb85e4bc4 which is partly reverted here. The intent there
was probably mostly about message (delivery) errors, which should be
considered important.
6 years ago
Kim Alvefur
0085d410b2
mod_csi_simple: Explicitly mention iq stanzas
...
Should be more obvious that all iq stanzas are considered important.
Changes behavior for invalid things in the default namespace.
6 years ago
Kim Alvefur
37a42fa605
mod_csi_simple: Clarify what might not be stanzas here
6 years ago
Kim Alvefur
ea91b4cc7b
mod_csi_simple: Consider nonzas important
...
This case was previously handled by fall-trough at the end of the
function.
6 years ago
Kim Alvefur
fc3bee71fd
mod_csi_simple: Explicitly consider errors important
...
This was already the case for presence and iq stanzas but not messages.
6 years ago
Kim Alvefur
8f77033238
mod_csi_simple: Consider MUC invites important
...
Both mediated invites defined by XEP-0045: Multi-User Chat and direct
invites defined by XEP-0249: Direct MUC Invitations
6 years ago
Kim Alvefur
4b33a7aac8
mod_csi_simple: Allow configuring extra tags indicating importance
6 years ago
Kim Alvefur
2a7715e94b
mod_csi_simple: Make sure to disable optimizations before mod_smacks (thanks pep.)
6 years ago
Kim Alvefur
2e1a43906f
mod_csi_simple: Always remove session filters when disabling CSI
...
Only guard the actual pausing of outgoing data on the method existing.
This prevents the filters from lingering in case something happened to
the connection. Removing already removed filters should be a safe noop.
6 years ago
Kim Alvefur
1356b90c3a
mod_csi_simple: Try not to flush buffer while already flushing it
...
Reduces log noice
6 years ago
Kim Alvefur
fad52c7686
mod_csi_simple: Remove duplicated check for connection
6 years ago
Kim Alvefur
6fcaa64f61
mod_csi_simple: Disable optimizations on disconnect ( fixes #1358 )
...
The connection becomes invalid here, regardless of 3rd party modules
that might keep the session alive.
7 years ago
Kim Alvefur
24c44a4566
mod_csi_simple: Consider messages encrypted payload as important (fixes part of #1250 )
7 years ago
Kim Alvefur
e03098631f
mod_csi_simple: Consider messages with subject (eg MUC joins) (fixes part of #1250 )
7 years ago
Kim Alvefur
05b481ec89
mod_csi_simple: Unpack Carbons-forwarded messages (fixes part of #1250 )
7 years ago
Kim Alvefur
9251fa5500
mod_csi_simple: Consider messages forwarded from another of the users clients as important (fixes part of #1250 )
7 years ago
Kim Alvefur
38c98346b1
mod_csi_simple: Tweak check for <body>
...
There were code that checked the body for mentions but isn't included.
7 years ago
Kim Alvefur
a24712e845
mod_csi: Set session.state to simplify CSI modules
...
Moved here from mod_csi_simple
7 years ago
Kim Alvefur
64b9b5a758
mod_csi_simple: Fix autocompletion mistake
7 years ago
Kim Alvefur
1796f20abc
mod_csi_simple: Bypass importance event in active mode ( fixes #1249 )
7 years ago
Kim Alvefur
0db6c3f669
mod_csi_simple: Don't set <delay> stamps on <iq> stanzas ( fixes #1248 )
7 years ago
Kim Alvefur
ad38cc8fbe
mod_csi_simple: Use the same event name when firing as when hooking ( fixes #1245 )
7 years ago
Kim Alvefur
3d3e0fa082
mod_csi_simple: Consider non-stanza objects important
...
Most cases are for keepalive or stream closing, where it needs to be
flushed anyways.
7 years ago
Kim Alvefur
23be1afef6
mod_csi_simple: Skip delay tags on objects other than stanzas (thanks quest)
...
This may be triggered by sending strings, eg as done by mod_c2s for
keepalives, stream errors, "</stream>".
7 years ago
Kim Alvefur
61151d4d82
mod_csi_simple: Import modified version of mod_csi_pump from prosody-modules
7 years ago
Kim Alvefur
096ebc3bcf
mod_csi_simple: Include queue size in debug messages
7 years ago
Matthew Wild
5074566d79
mod_csi_simple: Fix type in function name
7 years ago