summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-08-13 19:56:55 +0200
committerGitHub <noreply@github.com>2019-08-13 19:56:55 +0200
commit539f016c1b1a706da2c113435ec60bb39c868f4b (patch)
tree691e212ec4017bb6744dc23f2bd1dce2cb18e92b /src/network
parente9ceead81dd989936e2de3ff7cd7496aecd09d39 (diff)
downloadminetest-539f016c1b1a706da2c113435ec60bb39c868f4b.tar.gz
minetest-539f016c1b1a706da2c113435ec60bb39c868f4b.tar.bz2
minetest-539f016c1b1a706da2c113435ec60bb39c868f4b.zip
Better F6 profiler (#8750)
Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/connection.cpp b/src/network/connection.cpp
index 9fb43179d..913088da7 100644
--- a/src/network/connection.cpp
+++ b/src/network/connection.cpp
@@ -849,8 +849,8 @@ void Peer::RTTStatistics(float rtt, const std::string &profiler_id,
jitter * (1/num_samples);
if (!profiler_id.empty()) {
- g_profiler->graphAdd(profiler_id + "_rtt", rtt);
- g_profiler->graphAdd(profiler_id + "_jitter", jitter);
+ g_profiler->graphAdd(profiler_id + " RTT [ms]", rtt * 1000.f);
+ g_profiler->graphAdd(profiler_id + " jitter [ms]", jitter * 1000.f);
}
}
/* save values required for next loop */