Skip to content

Commit f7ab993

Browse files
committed
refactor: [#1589] add logs for debugging
1 parent b254ffd commit f7ab993

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/udp-tracker-server/src/statistics/repository.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ impl Repository {
8989

9090
drop(stats_lock);
9191

92+
tracing::debug!(
93+
"Recalculated UDP average connect processing time: {} ns (previous: {} ns, req_processing_time: {} ns, udp_connections_handled: {})",
94+
new_avg,
95+
previous_avg,
96+
req_processing_time,
97+
udp_connections_handled
98+
);
99+
92100
new_avg
93101
}
94102

@@ -109,6 +117,14 @@ impl Repository {
109117

110118
drop(stats_lock);
111119

120+
tracing::debug!(
121+
"Recalculated UDP average announce processing time: {} ns (previous: {} ns, req_processing_time: {} ns, udp_announces_handled: {})",
122+
new_avg,
123+
previous_avg,
124+
req_processing_time,
125+
udp_announces_handled
126+
);
127+
112128
new_avg
113129
}
114130

@@ -128,6 +144,14 @@ impl Repository {
128144

129145
drop(stats_lock);
130146

147+
tracing::debug!(
148+
"Recalculated UDP average scrape processing time: {} ns (previous: {} ns, req_processing_time: {} ns, udp_scrapes_handled: {})",
149+
new_avg,
150+
previous_avg,
151+
req_processing_time,
152+
udp_scrapes_handled
153+
);
154+
131155
new_avg
132156
}
133157
}

0 commit comments

Comments
 (0)