Pull request 2054: 6220-average-processing-time

Updates #6220.

Squashed commit of the following:

commit 2ad87979b4f8ade2cad8a1b86b8e0663dd53b098
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 9 13:55:09 2023 +0300

    all: upd go

commit 387200c3de899e6f59e8d2455cb2aa2b7194b311
Merge: 37f2855ed f8fe9bfc8
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 9 13:49:59 2023 +0300

    Merge branch 'master' into 6220-average-processing-time

commit 37f2855ed104c20faa3f4d57d48bd221a59cacb3
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Nov 8 17:08:13 2023 +0300

    client: upd locales

commit a09be4183811cef29b594f9916dc76b87f89d304
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Nov 7 20:46:24 2023 +0300

    all: imp docs

commit f0b85ac1fef366da37b996d53e29d76d6279691f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 14:17:32 2023 +0300

    all: add todo

commit 48a5879865a1625410787edef6d78b309056af7b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 13:38:14 2023 +0300

    all: add upstream time

commit 4d7431c00e24f8a9d3e86160851b5ef3bd9d03fa
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Oct 31 17:27:19 2023 +0300

    all: upd chlog

commit 040b6b9cdebea2c9789d4d38f2a0a40ef4cb26d7
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Oct 31 15:42:04 2023 +0300

    all: imp average processing time
This commit is contained in:
Stanislav Chzhen 2023-11-09 16:14:05 +03:00
parent f8fe9bfc8b
commit d3862614e5
48 changed files with 70 additions and 100 deletions

View File

@ -1,7 +1,7 @@
'name': 'build'
'env':
'GO_VERSION': '1.20.10'
'GO_VERSION': '1.20.11'
'NODE_VERSION': '16'
'on':

View File

@ -1,7 +1,7 @@
'name': 'lint'
'env':
'GO_VERSION': '1.20.10'
'GO_VERSION': '1.20.11'
'on':
'push':

View File

@ -35,6 +35,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Fixed
- Average request processing time calculation ([#6220]).
- Redundant shortening long client names in the Top Clients table ([#6338]).
- Scrolling column headers in the tables ([#6337]).
- `$important,dnsrewrite` rules do not take precedence over allowlist rules
@ -44,6 +45,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
[#4977]: https://github.com/AdguardTeam/AdGuardHome/issues/4977
[#6204]: https://github.com/AdguardTeam/AdGuardHome/issues/6204
[#6220]: https://github.com/AdguardTeam/AdGuardHome/issues/6220
[#6329]: https://github.com/AdguardTeam/AdGuardHome/issues/6329
[#6335]: https://github.com/AdguardTeam/AdGuardHome/issues/6335
[#6337]: https://github.com/AdguardTeam/AdGuardHome/issues/6337

View File

@ -7,7 +7,7 @@
# Make sure to sync any changes with the branch overrides below.
'variables':
'channel': 'edge'
'dockerGo': 'adguard/golang-ubuntu:7.4'
'dockerGo': 'adguard/golang-ubuntu:7.5'
'stages':
- 'Build frontend':

View File

@ -10,7 +10,7 @@
# Make sure to sync any changes with the branch overrides below.
'variables':
'channel': 'edge'
'dockerGo': 'adguard/golang-ubuntu:7.4'
'dockerGo': 'adguard/golang-ubuntu:7.5'
'snapcraftChannel': 'edge'
'stages':

View File

@ -5,7 +5,7 @@
'key': 'AHBRTSPECS'
'name': 'AdGuard Home - Build and run tests'
'variables':
'dockerGo': 'adguard/golang-ubuntu:7.4'
'dockerGo': 'adguard/golang-ubuntu:7.5'
'stages':
- 'Tests':

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Ужыты бяспечны пошук",
"number_of_dns_query_to_safe_search": "Колькасць запытаў DNS для пошукавых сістэм, для якіх быў ужыты Бяспечны пошук",
"average_processing_time": "Сярэдні час апрацоўкі запыту",
"processing_time": "Час апрацоўкі",
"average_processing_time_hint": "Сярэдні час для апрацоўкі запыту DNS у мілісекундах",
"block_domain_use_filters_and_hosts": "Блакаваць дамены з выкарыстаннем фільтраў і файлаў хастоў",
"filters_block_toggle_hint": "Вы можаце наладзіць правілы блакавання ў «<a>Фільтрах</a>».",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Vynucené bezpečné vyhledávání",
"number_of_dns_query_to_safe_search": "Počet požadavků DNS na vyhledávače, při kterých bylo vynucené bezpečné vyhledávání",
"average_processing_time": "Průměrný čas zpracování",
"processing_time": "Doba zpracování",
"average_processing_time_hint": "Průměrný čas zpracování požadavků DNS v milisekundách",
"block_domain_use_filters_and_hosts": "Blokovat domény pomocí filtrů a seznamů adres",
"filters_block_toggle_hint": "Pravidla blokování můžete nastavit v nastavení <a>Filtry</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Håndhævet sikker søgning",
"number_of_dns_query_to_safe_search": "Antallet af DNS-forespørgsler til søgemaskiner, hvor Sikker Søgning blev håndhævet",
"average_processing_time": "Gennemsnitlig behandlingstid",
"processing_time": "Behandlingstid",
"average_processing_time_hint": "Gennemsnitlig behandlingstid i millisekunder af DNS-forespørgsel",
"block_domain_use_filters_and_hosts": "Blokér domæner vha. filtre og værtsfiler",
"filters_block_toggle_hint": "Du kan opsætte blokeringsregler i <a>Filterindstillingerne</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Sichere Suche erzwungen",
"number_of_dns_query_to_safe_search": "Anzahl der DNS-Anfragen bei denen Sichere Suche für Suchanfragen erzwungen wurde",
"average_processing_time": "Durchschnittliche Bearbeitungsdauer",
"processing_time": "Verarbeitungszeit",
"average_processing_time_hint": "Durchschnittliche Zeit in Millisekunden zur Bearbeitung von DNS-Anfragen",
"block_domain_use_filters_and_hosts": "Domains durch Filter und Host-Dateien sperren",
"filters_block_toggle_hint": "Sie können Blockierregeln in den <a>Filter</a>einstellungen erstellen.",

View File

@ -144,7 +144,8 @@
"enforced_save_search": "Enforced safe search",
"number_of_dns_query_to_safe_search": "The number of DNS requests to search engines for which Safe Search was enforced",
"average_processing_time": "Average processing time",
"processing_time": "Processing time",
"average_upstream_response_time": "Average upstream response time",
"response_time": "Response time",
"average_processing_time_hint": "Average time in milliseconds on processing a DNS request",
"block_domain_use_filters_and_hosts": "Block domains using filters and hosts files",
"filters_block_toggle_hint": "You can setup blocking rules in the <a>Filters</a> settings.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Búsquedas seguras forzadas",
"number_of_dns_query_to_safe_search": "Número de peticiones DNS a los motores de búsqueda para los que se aplicó la búsqueda segura forzada",
"average_processing_time": "Tiempo promedio de procesamiento",
"processing_time": "Tiempo de procesamiento",
"average_processing_time_hint": "Tiempo promedio en milisegundos al procesar una petición DNS",
"block_domain_use_filters_and_hosts": "Bloquear dominios usando filtros y archivos hosts",
"filters_block_toggle_hint": "Puedes configurar las reglas de bloqueo en la configuración de <a>filtros</a>.",

View File

@ -139,7 +139,6 @@
"enforced_save_search": "جستجوی اَمن اجبار شده",
"number_of_dns_query_to_safe_search": "تعداد درخواست های DNS برای موتور جستجو که جستجوی اَمن اجبار شده",
"average_processing_time": "میانگین زمان پردازش",
"processing_time": "زمان پردازش",
"average_processing_time_hint": "زمان میانگین بر هزارم ثانیه در پردازش درخواست DNS",
"block_domain_use_filters_and_hosts": "مسدودسازی دامنه ها توسط فیلترها و فایل های میزبان",
"filters_block_toggle_hint": "میتوانید دستورات مسدودسازی را در تنظیمات <a>فیلترها</a> راه اندازی کنید.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Turvallinen haku pakotettiin",
"number_of_dns_query_to_safe_search": "DNS-pyyntöjen määrä, joille turvallinen haku pakotettiin käyttöön",
"average_processing_time": "Keskimääräinen käsittelyaika",
"processing_time": "Käsittelyaika",
"average_processing_time_hint": "Keskimääräinen DNS-pyynnön käsittelyyn kulutettu aika millisekunteina",
"block_domain_use_filters_and_hosts": "Estä verkkotunnuksia suodattimilla ja hosts-tiedostoilla",
"filters_block_toggle_hint": "Voit määrittää estosääntöjä <a>suodatinasetuksissa</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Recherche sécurisée forcée",
"number_of_dns_query_to_safe_search": "Le nombre de requêtes DNS faites avec la Recherche securisée",
"average_processing_time": "Temps moyen de traitement",
"processing_time": "Délai de traitement",
"average_processing_time_hint": "Temps moyen (en millisecondes) de traitement d'une requête DNS",
"block_domain_use_filters_and_hosts": "Bloquez les domaines à l'aide des filtres et fichiers hosts",
"filters_block_toggle_hint": "Vous pouvez configurer les règles de filtrage dans les paramètres des <a>Filtres</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Omogućeno sigurno pretraživanje",
"number_of_dns_query_to_safe_search": "Broj DNS zahtjeva prema pretraživačima za koje je omogućeno Sigurno pretraživanje",
"average_processing_time": "Prosječno vrijeme obrade",
"processing_time": "Vrijeme obrade",
"average_processing_time_hint": "Prosječno vrijeme u milisekundama za obradu DNS zahtjeva",
"block_domain_use_filters_and_hosts": "Blokiraj domene koristeći filtre ili hosts datoteke",
"filters_block_toggle_hint": "Pravila blokiranja možete postaviti u postavkama <a>filtara</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Kényszerített biztonságos keresés",
"number_of_dns_query_to_safe_search": "A biztonságos keresésre kényszerített DNS lekérdezések száma",
"average_processing_time": "Átlagos feldolgozási idő",
"processing_time": "Feldolgozási idő",
"average_processing_time_hint": "A DNS lekérdezések feldolgozásához szükséges átlagos idő milliszekundumban",
"block_domain_use_filters_and_hosts": "Domainek blokkolása szűrők és hosztfájlok használatával",
"filters_block_toggle_hint": "A <a> szűrőbeállításoknál</a> megadhatja a blokkolási szabályokat.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Paksa pencarian aman",
"number_of_dns_query_to_safe_search": "Jumlah perminataan DNS ke mesin pencari yang dipaksa Pencarian Aman",
"average_processing_time": "Rata-rata waktu pemrosesan",
"processing_time": "Waktu pemrosesan",
"average_processing_time_hint": "Rata-rata waktu dalam milidetik untuk pemrosesan sebuah permintaan DNS",
"block_domain_use_filters_and_hosts": "Blokir domain menggunakan filter dan file hosts",
"filters_block_toggle_hint": "Anda dapat menyiapkan aturan pemblokiran di pengaturan <a>Penyaringan</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Ricerca sicura forzata",
"number_of_dns_query_to_safe_search": "Numero di richieste DNS dai motori di ricerca per i quali la Ricerca Sicura è stata forzata",
"average_processing_time": "Tempo di elaborazione medio",
"processing_time": "Tempo di elaborazione",
"average_processing_time_hint": "Tempo medio in millisecondi per elaborare una richiesta DNS",
"block_domain_use_filters_and_hosts": "Blocca domini utilizzando filtri e file hosts",
"filters_block_toggle_hint": "Puoi impostare le regole di blocco nelle impostazioni dei <a>Filtri</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "強制されたセーフサーチ",
"number_of_dns_query_to_safe_search": "セーフサーチが強制適用された検索エンジンへのDNSリクエストの数",
"average_processing_time": "平均処理時間",
"processing_time": "処理時間",
"average_processing_time_hint": "DNSリクエストの処理にかかる平均時間ミリ秒単位",
"block_domain_use_filters_and_hosts": "フィルタとhostsファイルを使用してドメインをブロックする",
"filters_block_toggle_hint": "<a>フィルタ</a>の設定でブロックするルールを設定することができます。",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "세이프서치 강제",
"number_of_dns_query_to_safe_search": "세이프서치가 적용된 검색 엔진에 대해 DNS 요청 수",
"average_processing_time": "평균처리 시간",
"processing_time": "처리 시간",
"average_processing_time_hint": "DNS 요청 처리시 평균 시간(밀리초)",
"block_domain_use_filters_and_hosts": "필터 및 호스트 파일을 사용하여 도메인 차단",
"filters_block_toggle_hint": "차단규칙<a>필터</a>을 설정할 수 있습니다.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Geforceerd veilig zoeken",
"number_of_dns_query_to_safe_search": "Aantal DNS aanvragen in zoekmachines dmv geforceerd veilig zoeken",
"average_processing_time": "Gemiddelde procestijd",
"processing_time": "Verwerkingstijd",
"average_processing_time_hint": "Gemiddelde verwerkingstijd in milliseconden van een DNS aanvraag",
"block_domain_use_filters_and_hosts": "Domeinen blokkeren d.m.v. filters en host-bestanden",
"filters_block_toggle_hint": "Je kan blokkeringsregels toevoegen in de <a>Filters</a> instellingen.",

View File

@ -128,7 +128,6 @@
"enforced_save_search": "Påtvungede barnevennlige søk",
"number_of_dns_query_to_safe_search": "Antall DNS-forespørsler til søkemotorer der \"Safe Search\" ble fremtvunget",
"average_processing_time": "Gjennomsnittlig behandlingstid",
"processing_time": "Behandlingstid",
"average_processing_time_hint": "Gjennomsnittstid for behandling av DNS-forespørsler i millisekunder",
"block_domain_use_filters_and_hosts": "Blokker domener ved hjelp av filtre, «hosts»-filer, og rå domener",
"filters_block_toggle_hint": "Du kan sette opp blokkeringsoppføringer i <a>Filtre</a>-innstillingene.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Wymuszone bezpieczne wyszukiwanie",
"number_of_dns_query_to_safe_search": "Liczba żądań DNS kierowanych do wyszukiwarek, dla których wymuszono Bezpieczne wyszukiwanie",
"average_processing_time": "Średni czas przetwarzania",
"processing_time": "Czas przetwarzania",
"average_processing_time_hint": "Średni czas przetwarzania żądania DNS liczony w milisekundach",
"block_domain_use_filters_and_hosts": "Zablokuj domeny za pomocą filtrów i plików host",
"filters_block_toggle_hint": "Możesz skonfigurować reguły blokowania w ustawieniach <a>Filtry</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Forçar pesquisa segura",
"number_of_dns_query_to_safe_search": "O número de solicitações de DNS para mecanismos de pesquisa para os quais a pesquisa segura foi aplicada",
"average_processing_time": "Tempo médio de processamento",
"processing_time": "Tempo de processamento",
"average_processing_time_hint": "Tempo médio em milissegundos no processamento de uma solicitação DNS",
"block_domain_use_filters_and_hosts": "Bloquear domínios usando arquivos de filtros e hosts",
"filters_block_toggle_hint": "Você pode configurar as regras de bloqueio nas configurações de <a>Filtros</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Forçar pesquisa segura",
"number_of_dns_query_to_safe_search": "O número de solicitações de DNS para motores de busca para os quais a pesquisa segura foi aplicada",
"average_processing_time": "Tempo médio de processamento",
"processing_time": "Tempo de processamento",
"average_processing_time_hint": "Tempo médio em milissegundos no processamento de uma solicitação DNS",
"block_domain_use_filters_and_hosts": "Bloquear domínios usando ficheiros de filtros e hosts",
"filters_block_toggle_hint": "Pode configurar as regras de bloqueio nas configurações de <a>Filtros</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Căutare protejată întărită",
"number_of_dns_query_to_safe_search": "Numărul de interogări DNS pe motoarele de căutare pentru care a fost impusă Căutarea Sigură",
"average_processing_time": "Timpul mediu de procesare",
"processing_time": "Timp de procesare",
"average_processing_time_hint": "Timp mediu în milisecunde la procesarea unei cereri DNS",
"block_domain_use_filters_and_hosts": "Blocați domenii folosind filtre și fișiere hosts",
"filters_block_toggle_hint": "Puteți configura regulile de blocare în setările <a>Filtre</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Применён безопасный поиск",
"number_of_dns_query_to_safe_search": "Количество запросов DNS для поисковых систем, для которых был применён Безопасный поиск",
"average_processing_time": "Среднее время обработки запроса",
"processing_time": "Время обработки",
"average_processing_time_hint": "Среднее время для обработки запроса DNS в миллисекундах",
"block_domain_use_filters_and_hosts": "Блокировать домены с использованием фильтров и файлов hosts",
"filters_block_toggle_hint": "Вы можете настроить правила блокировки в <a>«Фильтрах»</a>.",

View File

@ -122,7 +122,6 @@
"enforced_save_search": "ආරක්‍ෂිත සෙවීම බලාත්මක කළ",
"number_of_dns_query_to_safe_search": "ආරක්‍ෂිත සෙවීම බලාත්මක කළ සෙවුම් යන්ත්‍ර සඳහා ව.නා.ප. ඉල්ලීම් ගණන",
"average_processing_time": "සාමාන්‍ය සැකසුම් කාලය",
"processing_time": "සැකසුම් කාලය",
"average_processing_time_hint": "ව.නා.ප. ඉල්ලීමක් සැකසීමේ සාමාන්‍ය කාලය මිලි තත්පර වලින්",
"block_domain_use_filters_and_hosts": "පෙරහන් හා සත්කාරක ගොනු භාවිතයෙන් වසම් අවහිර කරන්න",
"filters_block_toggle_hint": "ඔබට අවහිර කිරීමේ නීති <a>පෙරහන්</a> තුළ පිහිටුවිය හැකිය.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Vynútené bezpečné vyhľadávanie",
"number_of_dns_query_to_safe_search": "Počet DNS dopytov na vyhľadávače, pri ktorých bolo vynútené bezpečné vyhľadávanie",
"average_processing_time": "Priemerný čas spracovania",
"processing_time": "Doba spracovania",
"average_processing_time_hint": "Priemerný čas spracovania DNS dopytu v milisekundách",
"block_domain_use_filters_and_hosts": "Blokovať domény pomocou filtrov a zoznamov adries",
"filters_block_toggle_hint": "Pravidlá blokovania môžete nastaviť v nastaveniach <a>Filtre</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Prisilno varno iskanje",
"number_of_dns_query_to_safe_search": "Število zahtev DNS za iskalnike, za katere je bilo uveljavljeno varno iskanje",
"average_processing_time": "Povprečni čas obdelave",
"processing_time": "Čas obdelave",
"average_processing_time_hint": "Povprečni čas v milisekundah pri obdelavi zahteve DNS",
"block_domain_use_filters_and_hosts": "Onemogoči domene s filtri in gostiteljskimi datotekami",
"filters_block_toggle_hint": "Pravila zaviranja lahko nastavite v nastavitvah <a>Filtri</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Nametni sigurno pretraživanje",
"number_of_dns_query_to_safe_search": "Broj DNS zahteva ka pretraživačima za koje je nametnuto sigurno pretraživanje",
"average_processing_time": "Prosečno vreme obrade",
"processing_time": "Vreme obrade",
"average_processing_time_hint": "Prosečno vreme u milisekundama za obradu DNS zahteva",
"block_domain_use_filters_and_hosts": "Blokiraj domene koristeći filtere i hosts datoteke",
"filters_block_toggle_hint": "Možete postaviti pravila blokiranja u <a>Filters</a> postavkama.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Aktivering av Säker surf",
"number_of_dns_query_to_safe_search": "Antalet DNS-förfrågningar mot sökmotorer där Säker surf tvingats",
"average_processing_time": "Genomsnittlig processtid",
"processing_time": "Bearbetningstid",
"average_processing_time_hint": "Genomsnittlig processtid i millisekunder för DNS-förfrågning",
"block_domain_use_filters_and_hosts": "Blockera domäner med filter- och värdfiler",
"filters_block_toggle_hint": "Du kan ställa in egna blockerings regler i <a>Filterinställningar</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Uygulanan güvenli arama",
"number_of_dns_query_to_safe_search": "Güvenli Aramanın uygulandığı arama motorlarına gönderilen DNS isteklerinin sayısı",
"average_processing_time": "Ortalama işlem süresi",
"processing_time": "İşlem süresi",
"average_processing_time_hint": "Bir DNS isteğinin milisaniye cinsinden ortalama işlem süresi",
"block_domain_use_filters_and_hosts": "Filtre ve hosts dosyalarını kullanarak alan adlarını engelle",
"filters_block_toggle_hint": "<a>Filtreler</a> ayarlarında engelleme kuralları oluşturabilirsiniz.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Примусовий безпечний пошук",
"number_of_dns_query_to_safe_search": "Кількість DNS-запитів до пошукових систем, для яких примусово застосований безпечний пошук",
"average_processing_time": "Середній час обробки",
"processing_time": "Час обробки",
"average_processing_time_hint": "Середній час обробки DNS запиту в мілісекундах",
"block_domain_use_filters_and_hosts": "Блокування доменів за допомогою фільтрів та hosts-файлів",
"filters_block_toggle_hint": "Ви можете налаштувати правила блокування в розділі <a>Фільтри</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "Bắt buộc tìm kiếm an toàn",
"number_of_dns_query_to_safe_search": "Số yêu cầu DNS tới công cụ tìm kiếm đã chuyển thành tìm kiếm an toàn",
"average_processing_time": "Thời gian xử lý trung bình",
"processing_time": "Thời gian xử lý",
"average_processing_time_hint": "Thời gian trung bình cho một yêu cầu DNS tính bằng mili giây",
"block_domain_use_filters_and_hosts": "Chặn tên miền sử dụng các bộ lọc và file hosts",
"filters_block_toggle_hint": "Bạn có thể thiết lập quy tắc chặn tại cài đặt <a>Bộ lọc</a>.",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "强制安全搜索",
"number_of_dns_query_to_safe_search": "启用强制安全搜索后对搜索引擎的 DNS 请求总数",
"average_processing_time": "平均处理时间",
"processing_time": "处理时间",
"average_processing_time_hint": "处理 DNS 请求的平均时间(毫秒)",
"block_domain_use_filters_and_hosts": "使用过滤器和 Hosts 文件以拦截指定域名",
"filters_block_toggle_hint": "你可以在 <a>过滤器</a> 设置中添加过滤规则。",

View File

@ -143,7 +143,6 @@
"enforced_save_search": "已強制執行的安全搜尋",
"number_of_dns_query_to_safe_search": "安全搜尋已被強制執行之屬於搜尋引擎的 DNS 請求之數量",
"average_processing_time": "平均的處理時間",
"processing_time": "處理時間",
"average_processing_time_hint": "在處理一項 DNS 請求時以毫秒ms計的平均時間",
"block_domain_use_filters_and_hosts": "透過過濾器和主機檔案封鎖網域",
"filters_block_toggle_hint": "您可在<a>過濾器</a>設定中設置封鎖規則。",

View File

@ -38,7 +38,7 @@ const UpstreamAvgTime = ({
subtitle,
}) => (
<Card
title={t('average_processing_time')}
title={t('average_upstream_response_time')}
subtitle={subtitle}
bodyType="card-table"
refresh={refreshButton}
@ -55,7 +55,7 @@ const UpstreamAvgTime = ({
Cell: DomainCell,
},
{
Header: <Trans>processing_time</Trans>,
Header: <Trans>response_time</Trans>,
accessor: 'count',
maxWidth: 190,
Cell: TimeCell,

3
go.mod
View File

@ -3,7 +3,8 @@ module github.com/AdguardTeam/AdGuardHome
go 1.20
require (
github.com/AdguardTeam/dnsproxy v0.56.3
// TODO(e.burkov): Update to v0.57.3.
github.com/AdguardTeam/dnsproxy v0.56.4-0.20231031121835-8d20902c442f
github.com/AdguardTeam/golibs v0.17.2
github.com/AdguardTeam/urlfilter v0.17.3
github.com/NYTimes/gziphandler v1.1.1

4
go.sum
View File

@ -1,5 +1,5 @@
github.com/AdguardTeam/dnsproxy v0.56.3 h1:WP1FooLfZQPHEH2SuwMtJsOurDt32rubGx0OddcsKT0=
github.com/AdguardTeam/dnsproxy v0.56.3/go.mod h1:ZvkbM71HwpilgkCnTubDiR4Ba6x5Qvnhy2iasMWaTDM=
github.com/AdguardTeam/dnsproxy v0.56.4-0.20231031121835-8d20902c442f h1:0fgscvsWpMq5G8Ab653inTgo2TXB6RxM2PjYArfs7t4=
github.com/AdguardTeam/dnsproxy v0.56.4-0.20231031121835-8d20902c442f/go.mod h1:ZvkbM71HwpilgkCnTubDiR4Ba6x5Qvnhy2iasMWaTDM=
github.com/AdguardTeam/golibs v0.17.2 h1:vg6wHMjUKscnyPGRvxS5kAt7Uw4YxcJiITZliZ476W8=
github.com/AdguardTeam/golibs v0.17.2/go.mod h1:DKhCIXHcUYtBhU8ibTLKh1paUL96n5zhQBlx763sj+U=
github.com/AdguardTeam/urlfilter v0.17.3 h1:fg/ObbnO0Cv6aw0tW6N/ETDMhhNvmcUUOZ7HlmKC3rw=

View File

@ -354,9 +354,8 @@ func (s *Server) Exchange(ip netip.Addr) (host string, ttl time.Duration, err er
}
dctx := &proxy.DNSContext{
Proto: "udp",
Req: req,
StartTime: time.Now(),
Proto: "udp",
Req: req,
}
var resolver *proxy.Proxy

View File

@ -2,7 +2,6 @@ package dnsforward
import (
"net/netip"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/dnsproxy/proxy"
@ -270,10 +269,9 @@ func (s *Server) genBlockedHost(request *dns.Msg, newAddr string, d *proxy.DNSCo
replReq.RecursionDesired = true
newContext := &proxy.DNSContext{
Proto: d.Proto,
Addr: d.Addr,
StartTime: time.Now(),
Req: &replReq,
Proto: d.Proto,
Addr: d.Addr,
Req: &replReq,
}
prx := s.proxy()

View File

@ -20,11 +20,10 @@ func (s *Server) processQueryLogsAndStats(dctx *dnsContext) (rc resultCode) {
log.Debug("dnsforward: started processing querylog and stats")
defer log.Debug("dnsforward: finished processing querylog and stats")
elapsed := time.Since(dctx.startTime)
pctx := dctx.proxyCtx
q := pctx.Req.Question[0]
host := aghnet.NormalizeDomain(q.Name)
processingTime := time.Since(dctx.startTime)
ip, _ := netutil.IPAndPortFromAddr(pctx.Addr)
ip = slices.Clone(ip)
@ -43,7 +42,7 @@ func (s *Server) processQueryLogsAndStats(dctx *dnsContext) (rc resultCode) {
defer s.serverLock.RUnlock()
if s.shouldLog(host, qt, cl, ids) {
s.logQuery(dctx, pctx, elapsed, ip)
s.logQuery(dctx, ip, processingTime)
} else {
log.Debug(
"dnsforward: request %s %s %q from %s ignored; not adding to querylog",
@ -55,7 +54,7 @@ func (s *Server) processQueryLogsAndStats(dctx *dnsContext) (rc resultCode) {
}
if s.shouldCountStat(host, qt, cl, ids) {
s.updateStats(dctx, elapsed, *dctx.result, ipStr)
s.updateStats(dctx, ipStr, processingTime)
} else {
log.Debug(
"dnsforward: request %s %s %q from %s ignored; not counting in stats",
@ -90,12 +89,9 @@ func (s *Server) shouldCountStat(host string, qt, cl uint16, ids []string) (ok b
}
// logQuery pushes the request details into the query log.
func (s *Server) logQuery(
dctx *dnsContext,
pctx *proxy.DNSContext,
elapsed time.Duration,
ip net.IP,
) {
func (s *Server) logQuery(dctx *dnsContext, ip net.IP, processingTime time.Duration) {
pctx := dctx.proxyCtx
p := &querylog.AddParams{
Question: pctx.Req,
ReqECS: pctx.ReqECS,
@ -104,7 +100,7 @@ func (s *Server) logQuery(
Result: dctx.result,
ClientID: dctx.clientID,
ClientIP: ip,
Elapsed: elapsed,
Elapsed: processingTime,
AuthenticatedData: dctx.responseAD,
}
@ -132,30 +128,27 @@ func (s *Server) logQuery(
}
// updatesStats writes the request into statistics.
func (s *Server) updateStats(
ctx *dnsContext,
elapsed time.Duration,
res filtering.Result,
clientIP string,
) {
pctx := ctx.proxyCtx
func (s *Server) updateStats(dctx *dnsContext, clientIP string, processingTime time.Duration) {
pctx := dctx.proxyCtx
e := &stats.Entry{
Domain: aghnet.NormalizeDomain(pctx.Req.Question[0].Name),
Result: stats.RNotFiltered,
Time: elapsed,
Domain: aghnet.NormalizeDomain(pctx.Req.Question[0].Name),
Result: stats.RNotFiltered,
ProcessingTime: processingTime,
UpstreamTime: pctx.QueryDuration,
}
if pctx.Upstream != nil {
e.Upstream = pctx.Upstream.Address()
}
if clientID := ctx.clientID; clientID != "" {
if clientID := dctx.clientID; clientID != "" {
e.Client = clientID
} else {
e.Client = clientIP
}
switch res.Reason {
switch dctx.result.Reason {
case filtering.FilteredSafeBrowsing:
e.Result = stats.RSafeBrowsing
case filtering.FilteredParental:

View File

@ -33,10 +33,10 @@ func TestStats_races(t *testing.T) {
writeFunc := func(start, fin *sync.WaitGroup, waitCh <-chan unit, i int) {
e := &Entry{
Domain: fmt.Sprintf("example-%d.org", i),
Client: fmt.Sprintf("client_%d", i),
Result: Result(i)%(resultLast-1) + 1,
Time: time.Since(startTime),
Domain: fmt.Sprintf("example-%d.org", i),
Client: fmt.Sprintf("client_%d", i),
Result: Result(i)%(resultLast-1) + 1,
ProcessingTime: time.Since(startTime),
}
start.Done()

View File

@ -76,17 +76,19 @@ func TestStats(t *testing.T) {
const respUpstream = "upstream"
entries := []*stats.Entry{{
Domain: reqDomain,
Client: cliIPStr,
Result: stats.RFiltered,
Time: time.Microsecond * 123456,
Upstream: respUpstream,
Domain: reqDomain,
Client: cliIPStr,
Result: stats.RFiltered,
ProcessingTime: time.Microsecond * 123456,
Upstream: respUpstream,
UpstreamTime: time.Microsecond * 222222,
}, {
Domain: reqDomain,
Client: cliIPStr,
Result: stats.RNotFiltered,
Time: time.Microsecond * 123456,
Upstream: respUpstream,
Domain: reqDomain,
Client: cliIPStr,
Result: stats.RNotFiltered,
ProcessingTime: time.Microsecond * 123456,
Upstream: respUpstream,
UpstreamTime: time.Microsecond * 222222,
}}
wantData := &stats.StatsResp{
@ -95,7 +97,7 @@ func TestStats(t *testing.T) {
TopClients: []map[string]uint64{0: {cliIPStr: 2}},
TopBlocked: []map[string]uint64{0: {reqDomain: 1}},
TopUpstreamsResponses: []map[string]uint64{0: {respUpstream: 2}},
TopUpstreamsAvgTime: []map[string]float64{0: {respUpstream: 0.123456}},
TopUpstreamsAvgTime: []map[string]float64{0: {respUpstream: 0.222222}},
DNSQueries: []uint64{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
@ -196,10 +198,10 @@ func TestLargeNumbers(t *testing.T) {
for i := 0; i < cliNumPerHour; i++ {
ip := net.IP{127, 0, byte((i & 0xff00) >> 8), byte(i & 0xff)}
e := &stats.Entry{
Domain: fmt.Sprintf("domain%d.hour%d", i, h),
Client: ip.String(),
Result: stats.RNotFiltered,
Time: 123456,
Domain: fmt.Sprintf("domain%d.hour%d", i, h),
Client: ip.String(),
Result: stats.RNotFiltered,
ProcessingTime: 123456,
}
s.Update(e)
}

View File

@ -68,8 +68,12 @@ type Entry struct {
// Result is the result of processing the request.
Result Result
// Time is the duration of the request processing.
Time time.Duration
// ProcessingTime is the duration of the request processing from the start
// of the request including timeouts.
ProcessingTime time.Duration
// UpstreamTime is the duration of the successful request to the upstream.
UpstreamTime time.Duration
}
// validate returns an error if entry is not valid.
@ -103,8 +107,8 @@ type unit struct {
// upstreamsResponses stores the number of responses from each upstream.
upstreamsResponses map[string]uint64
// upstreamsTimeSum stores the sum of processing time in microseconds of
// responses from each upstream.
// upstreamsTimeSum stores the sum of durations of successful queries in
// microseconds to each upstream.
upstreamsTimeSum map[string]uint64
// nResult stores the number of requests grouped by it's result.
@ -323,13 +327,14 @@ func (u *unit) add(e *Entry) {
}
u.clients[e.Client]++
t := uint64(e.Time.Microseconds())
u.timeSum += t
pt := uint64(e.ProcessingTime.Microseconds())
u.timeSum += pt
u.nTotal++
if e.Upstream != "" {
u.upstreamsResponses[e.Upstream]++
u.upstreamsTimeSum[e.Upstream] += t
ut := uint64(e.UpstreamTime.Microseconds())
u.upstreamsTimeSum[e.Upstream] += ut
}
}

View File

@ -35,7 +35,7 @@ set -f -u
go_version="$( "${GO:-go}" version )"
readonly go_version
go_min_version='go1.20.10'
go_min_version='go1.20.11'
go_version_msg="
warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}).
if you have the version installed, please set the GO environment variable.