This commit is contained in:
Pascal Fischer
2024-04-25 15:44:06 +02:00
parent e50ed290d9
commit fbb1181b64
2 changed files with 29 additions and 0 deletions

View File

@@ -106,6 +106,12 @@ func openDB(mmdbPath string) (*maxminddb.Reader, error) {
}
func (gl *Geolocation) Lookup(ip net.IP) (*Record, error) {
startTime := time.Now()
defer func() {
duration := time.Since(startTime)
log.Debugf("(GeoLocation) Lookup took %s", duration)
}()
gl.mux.RLock()
defer gl.mux.RUnlock()