Add script to show packets count from client logs #123
No reviewers
Labels
No Label
blocker
bug
code quality
confirmed
critical
discussion
high priority
incompatibility
incomplete feature
invalid
low priority
missing feauture
needs testing
packet spam
performance
project
regression
translations
unconfirmed
in review
ready for review
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Blocks
#122 HUD/hudbars: Do not send useless HUDCHANGE packets
Mineclonia/Mineclonia
Reference: Mineclonia/Mineclonia#123
Loading…
Reference in New Issue
No description provided.
Delete Branch "analyze-packet-spam"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
TRACKING ISSUE: #111
To address lag issues caused by too many network packets being sent, we need to identify which changes increase the number of sent packets and which decrease it. Doing this now involves using Wireshark and some manual work calculations.
Solution
This patch adds a bourne shell script that calculates per-second packet counts from Minetest log files.
Details
The Minetest engine already logs packet counts every 30 seconds at log level INFO.
The script added in this PR determines the time frame and sums up packets by packet type.
It then calculates the packet count per second by packet type.
Testing Steps
Setup
01c8339f40
.Collect Data
timeout 600 minetest --info >log.txt 2>&1 >/dev/null
.packetspam
.01c8339f40
.Packet Count Calculation
tools/analyze-packet-spam
script withlog.txt
given on standard input:./tools/analyze-packet-spam <log.txt
.Packet Count Verification
log.txt
usinggrep
:grep TOCLIENT_HUDCHANGE <log.txt
Packet Count Calculation
section.To do
Add script to show packets count from client logsto WIP: Add script to show packets count from client logs38b2e70239
tocb5c7346a7
cb5c7346a7
to01c8339f40
WIP: Add script to show packets count from client logsto Add script to show packets count from client logs@ -0,0 +49,4 @@
*)
PACKET_COUNT_PER_SECOND=$(
printf '1k %s %s /p' "${PACKET_COUNT}" "${DURATION}" \
|dc
Note:
dc
isn't specified in POSIX, butbc
is.Thanks, I did not know.
Setup
01c8339f40
.Collect Data
timeout 600 minetest --info >log.txt 2>&1 >/dev/null
.packetspam
.01c8339f40
.log.txt
has been created and is not empty.Packet Count Calculation
tools/analyze-packet-spam
script withlog.txt
given on standard input:./tools/analyze-packet-spam <log.txt
.PACKET_COUNT_TOCLIENT_HUDCHANGE
.Packet Count Verification
TOCLIENT_HUDCHANGE log
lines fromlog.txt
using grep:grep TOCLIENT_HUDCHANGE <log.txt
(NB: Mine was slightly different (572s), presumably because I took a few seconds longer to navigate the menu or generate the world.)