Skip to content

Commit 73e0ec8

Browse files
committed
UI: Revert to the original approach for response time
1 parent f602e68 commit 73e0ec8

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

dnscrypt-proxy/monitoring_ui.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,7 @@ func (ui *MonitoringUI) UpdateMetrics(pluginsState PluginsState, msg *dns.Msg, s
306306
}
307307

308308
// Update response time - back to counters lock
309-
var responseTime int64
310-
if !pluginsState.requestStart.IsZero() && !pluginsState.requestEnd.IsZero() {
311-
responseTime = pluginsState.requestEnd.Sub(pluginsState.requestStart).Milliseconds()
312-
} else {
313-
// For incomplete queries, use timeout duration
314-
responseTime = pluginsState.timeout.Milliseconds()
315-
}
309+
responseTime := time.Since(start).Milliseconds()
316310

317311
// Cap at timeout to handle system sleep/suspend
318312
maxResponseTime := pluginsState.timeout.Milliseconds()

0 commit comments

Comments
 (0)