🔮[RFC ]: OpenIM Message Latency Testing #1280
Labels
enhancement
New feature or request
feature
Categorizes issue or PR as related to a new feature.
RFC
Project design proposal
Definition of Message Latency
The time it takes from the sender sending the message to the recipient triggering the
onRecvNewMessage
callback.Test Program Design
Developers should integrate the OpenIMSDK into their own apps to implement instant messaging. The test program is based on OpenIMSDK, simulating real scenarios to test message latency.
The main features are:
(1) Simulate sending messages: Send a message to another user. After the message is successfully sent or fails, send the next one.
(2) Stay online after logging in: Consistently stay online without logging out.
(3) Upon receiving a command: Count the number of conversations and fetch the total number of messages for each conversation.
(4) Specify the number of OpenIMSDK instances.
Statistics
(1) After all messages are sent, the test client counts the number of messages sent successfully and unsuccessfully, as well as the
msgID
of failed messages.(2) The server counts the message storage details, including seq and storage in redis/mongo.
(3) On command: Count the conversations and tally all the messages. Confirm if the received messages match the expected ones.
(4) For the
onRecvNewMessage
callback, record the latency of each message and output the overall statistical results.Objectives
(1) For stress testing, the number of messages successfully and unsuccessfully sent by the client and server should match. For
msgID
s where the client sending failed but the server succeeded, check if they were synchronized to the client through synchronization logic.(2) All test client conversations and received messages should be consistent with expectations.
(3) Under certain stress conditions (e.g., the number of simultaneous online users, total messages sent per second) and specific server resources (CPU, memory, etc.), the message latency should be less than 2 seconds.
The text was updated successfully, but these errors were encountered: