]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Apply suggestions from code review 14722/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 7 Oct 2024 11:52:54 +0000 (13:52 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2024 11:52:54 +0000 (13:52 +0200)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/recursordist/metrics.py
pdns/recursordist/metrics_table.py

index 21edb3e81da3f2c06541a97a525f19b51c02974d..469ecebad026af06cf204e9de7503ed57e0f350d 100644 (file)
@@ -15,9 +15,9 @@ print("metrics.py srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
 
 def dedashForSNMP(name):
     cap = False
-    ret= ''
+    ret = ''
     for ch in name:
-        if ch =='-':
+        if ch == '-':
             cap = True
         elif cap:
             ret += ch.upper()
index 8efea77aa195796e568e6e679b26476550d22bcf..8ed450dfa62442b1c96a935a0320d455d9f83945 100644 (file)
@@ -7,7 +7,7 @@
 # - rec-prometheus-gen.h
 # - rec-snmp-gen.h
 #
-# The .h files are included by the relavant C++ code.
+# The .h files are included by the relevant C++ code.
 # Keep the order sorted by SNMP OID (if present).
 #
 #    {
@@ -16,7 +16,7 @@
 #        'desc':  One line description ending up in docs, SNMP MIB and Prometheus HELP. Required. A dot is added at the end if absent.
 #        'longdesc': Extra description added to docs entry. Optional. A dot is added at the end if absent.
 #        'snmp': 1 SNMP OID count, must be unique. If absent, no SNMP entry is generated
-#        'snmpname': Override of SNMP name (if legeacy name did not follow convention)
+#        'snmpname': Override of SNMP name (if legacy name did not follow convention)
 #        'ptype': The promethheus type, default counter. Can also be gauge, histogram, multicounter. Also determines SNMP type.
 #        'pdesc': Override of Prometheus HELP text, if empty, no Prometheus entry is generated.
 #        'if': rec_control metrics conditionalized on expression
         'desc': 'Number of times internal maintenance has been called, including Lua maintenance',
     },
 
-    # Entries for aith-rcode-answers are a bit different than others: separate rec_control and SNMP metrics, but a multicounter entry for Prometheus. THe alphabetically firts gets a real pname, the others an empty one.
+    # Entries for auth-rcode-answers are a bit different than others: separate rec_control and SNMP metrics, but a multicounter entry for Prometheus. The alphabetically first gets a real pname, the others an empty one.
     # We only generate the Prometheus comment for the first one
     {
         'name': 'auth-noerror-answers',