aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2022-11-30 14:46:10 +0000
committerpmikus <peter.mikus@protonmail.ch>2022-12-06 07:12:09 +0000
commit5466cc69f18a480dbff7e39d28abbbccf683ba2f (patch)
tree1ec87291b32aa79dc2f6a48b7a3533548f5ed61b /resources
parentbfbdfaedb044b7643b81f47e76285baedfee9e25 (diff)
feat(telemetry): Add telemetry export
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: Ibb8a59fd4e08bc736494c7ab18e689a55f7a98dc
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/TelemetryUtil.py138
-rw-r--r--resources/libraries/python/model/ExportResult.py9
-rw-r--r--resources/libraries/robot/performance/performance_actions.robot6
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot5
-rw-r--r--resources/templates/telemetry/vpp_clear_stats.yaml64
-rw-r--r--resources/templates/telemetry/vpp_runtime.yaml347
-rw-r--r--resources/templates/telemetry/vpp_show_stats.yaml60
-rw-r--r--resources/templates/telemetry/vpp_test_teardown.yaml60
-rw-r--r--resources/templates/telemetry/vppctl_clear_stats.yaml64
-rw-r--r--resources/templates/telemetry/vppctl_runtime.yaml306
-rw-r--r--resources/templates/telemetry/vppctl_show_stats.yaml60
-rw-r--r--resources/templates/telemetry/vppctl_test_teardown.yaml60
-rw-r--r--resources/tools/telemetry/bundle_perf_stat.py8
-rw-r--r--resources/tools/telemetry/bundle_vppctl.py6
-rw-r--r--resources/tools/telemetry/constants.py1
-rw-r--r--resources/tools/telemetry/metrics.py8
16 files changed, 452 insertions, 750 deletions
diff --git a/resources/libraries/python/TelemetryUtil.py b/resources/libraries/python/TelemetryUtil.py
index c978441d72..70efa13fff 100644
--- a/resources/libraries/python/TelemetryUtil.py
+++ b/resources/libraries/python/TelemetryUtil.py
@@ -13,131 +13,87 @@
"""Telemetry utility."""
-from robot.api import logger
-from time import sleep
-
+from resources.libraries.python.model.ExportResult import append_telemetry
from resources.libraries.python.Constants import Constants
-from resources.libraries.python.VppCounters import VppCounters
-from resources.libraries.python.OptionString import OptionString
-from resources.libraries.python.ssh import exec_cmd, exec_cmd_no_error
+from resources.libraries.python.ssh import exec_cmd_no_error
from resources.libraries.python.topology import NodeType
-__all__ = [u"TelemetryUtil"]
+__all__ = ["TelemetryUtil"]
class TelemetryUtil:
"""Class contains methods for telemetry utility."""
@staticmethod
- def perf_stat(node, cpu_list=None, duration=1):
- """Get perf stat read for duration.
-
- :param node: Node in the topology.
- :param cpu_list: CPU List as a string separated by comma.
- :param duration: Measure time in seconds.
- :type node: dict
- :type cpu_list: str
- :type duration: int
- """
- if cpu_list:
- cpu_list = list(dict.fromkeys(cpu_list.split(u",")))
- cpu_list = ",".join(str(cpu) for cpu in cpu_list)
-
- cmd_opts = OptionString(prefix=u"--")
- cmd_opts.add(u"no-aggr")
- cmd_opts.add_with_value_if(
- u"cpu", cpu_list, cpu_list
- )
- cmd_opts.add_if(
- u"all-cpus", not(cpu_list)
- )
- cmd_opts.add_with_value_if(
- u"event", f"'{{{Constants.PERF_STAT_EVENTS}}}'",
- Constants.PERF_STAT_EVENTS
- )
- cmd_opts.add_with_value(
- u"interval-print", 1000
- )
- cmd_opts.add_with_value(
- u"field-separator", u"';'"
- )
-
- cmd_base = OptionString()
- cmd_base.add(f"perf stat")
- cmd_base.extend(cmd_opts)
- cmd_base.add(u"--")
- cmd_base.add_with_value(u"sleep", int(duration))
-
- exec_cmd(node, cmd_base, sudo=True)
-
- @staticmethod
- def perf_stat_on_all_duts(nodes, cpu_list=None, duration=1):
- """Get perf stat read for duration on all DUTs.
-
- :param nodes: Nodes in the topology.
- :param cpu_list: CPU List.
- :param duration: Measure time in seconds.
- :type nodes: dict
- :type cpu_list: str
- :type duration: int
- """
- for node in nodes.values():
- if node[u"type"] == NodeType.DUT:
- TelemetryUtil.perf_stat(
- node, cpu_list=cpu_list, duration=duration
- )
-
- @staticmethod
- def run_telemetry(node, profile, hook=None):
- """Get telemetry stat read for duration.
+ def _run_telemetry(
+ node, profile, sid=None, spath=None, oload="", export=False):
+ """Get telemetry read on node.
:param node: Node in the topology.
:param profile: Telemetry configuration profile.
- :param hook: Process ID or socket path (optional).
+ :param sid: Socket ID used to describe recipient side of socket.
+ :param spath: Socket path.
+ :param oload: Telemetry offered load, unique within the test (optional).
+ :param export: If false, do not attempt JSON export (default false).
:type node: dict
:type profile: str
- :type hook: str
+ :type sid: str
+ :type spath: str
+ :type oload: str
+ :type export: bool
"""
- config = u""
+ config = ""
config += f"{Constants.REMOTE_FW_DIR}/"
config += f"{Constants.RESOURCES_TPL_TELEMETRY}/"
config += f"{profile}"
- cd_cmd = u""
+ cd_cmd = ""
cd_cmd += f"sh -c \"cd {Constants.REMOTE_FW_DIR}/"
cd_cmd += f"{Constants.RESOURCES_TOOLS}"
- bin_cmd = f"python3 -m telemetry --config {config} --hook {hook}\""
- hostname = node[u"host"]
-
+ if spath:
+ bin_cmd = f"python3 -m telemetry --config {config} --hook {spath}\""
+ else:
+ bin_cmd = f"python3 -m telemetry --config {config}\""
exec_cmd_no_error(node, f"{cd_cmd} && {bin_cmd}", sudo=True)
+
+ if not export:
+ return
+
+ hostname = exec_cmd_no_error(node, "hostname")[0].strip()
stdout, _ = exec_cmd_no_error(
- node, u"cat /tmp/metric.prom", sudo=True, log_stdout_err=False
- )
- logger.info(
- u"# TYPE target info\n"
- u"# HELP target Target metadata\n"
- f"target_info{{hostname=\"{hostname}\",hook=\"{hook}\"}} 1\n"
- f"{stdout}"
+ node, "cat /tmp/metric.prom", sudo=True, log_stdout_err=False
)
+ prefix = "{"
+ prefix += f"hostname=\"{hostname}\","
+ if sid:
+ prefix += f"hook=\"{sid}\","
+ prefix += f"oload=\"{oload}\","
+ for line in stdout.splitlines():
+ if line and not line.startswith("#"):
+ append_telemetry(
+ prefix.join(line.rsplit("{", 1)).replace("\"", "'")
+ )
- @staticmethod
- def run_telemetry_on_all_duts(nodes, profile):
- """Get telemetry stat read on all DUTs.
+ def run_telemetry_on_all_duts(self, nodes, profile, oload="", export=False):
+ """Get telemetry read on all DUTs.
:param nodes: Nodes in the topology.
:param profile: Telemetry configuration profile.
- :param hooks: Dict of Process IDs or socket paths (optional).
+ :param oload: Telemetry offered load, unique within the test (optional).
+ :param export: If false, do not attempt JSON export (default false).
:type nodes: dict
:type profile: str
- :type hooks: dict
+ :type oload: str
+ :type export: bool
"""
for node in nodes.values():
- if node[u"type"] == NodeType.DUT:
+ if node["type"] == NodeType.DUT:
try:
- for socket in node[u"sockets"][u"CLI"].values():
- TelemetryUtil.run_telemetry(
- node, profile=profile, hook=socket
+ for sid, spath in node["sockets"]["CLI"].items():
+ self._run_telemetry(
+ node, profile=profile, sid=sid, spath=spath,
+ oload=oload, export=export
)
except IndexError:
pass
diff --git a/resources/libraries/python/model/ExportResult.py b/resources/libraries/python/model/ExportResult.py
index dbe2914565..31840c9deb 100644
--- a/resources/libraries/python/model/ExportResult.py
+++ b/resources/libraries/python/model/ExportResult.py
@@ -210,3 +210,12 @@ def export_ndrpdr_latency(text, latency):
if len(latency) < 2:
return
_add_latency(result_node, percent, u"reverse", latency[1])
+
+def append_telemetry(telemetry_item):
+ """Append telemetry entry to proper place so it is dumped into json.
+
+ :param telemetry_item: Telemetry entry.
+ :type telemetry_item: str
+ """
+ data = get_export_data()
+ data[u"telemetry"].append(telemetry_item)
diff --git a/resources/libraries/robot/performance/performance_actions.robot b/resources/libraries/robot/performance/performance_actions.robot
index 40f0bc9999..0404ce2a52 100644
--- a/resources/libraries/robot/performance/performance_actions.robot
+++ b/resources/libraries/robot/performance/performance_actions.robot
@@ -95,6 +95,7 @@
| | ... | ramp_up_rate=${ramp_up_rate}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_runtime.yaml
+| | ... | oload=${telemetry_oload} | export=${True}
| | Stop traffic on tg
| Additional Statistics Action For bpf-runtime
@@ -131,6 +132,7 @@
| | ... | ramp_up_rate=${ramp_up_rate}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=bpf_runtime.yaml
+| | ... | oload=${telemetry_oload} | export=${False}
| | Stop traffic on tg
| Additional Statistics Action For perf-stat-runtime
@@ -167,6 +169,7 @@
| | ... | ramp_up_rate=${ramp_up_rate}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=perf_stat_runtime.yaml
+| | ... | oload=${telemetry_oload} | export=${False}
| | Stop traffic on tg
| Additional Statistics Action For vpp-runtime-iperf3
@@ -192,6 +195,7 @@
| | | ... | affinity=${iperf_client_affinity}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_runtime.yaml
+| | ... | oload=${telemetry_oload} | export=${True}
| | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
| Additional Statistics Action For noop
@@ -206,6 +210,7 @@
| |
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_clear_stats.yaml
+| | ... | export=${False}
| Additional Statistics Action For vpp-enable-packettrace
| | [Documentation]
@@ -227,3 +232,4 @@
| |
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_show_stats.yaml
+| | ... | export=${False}
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index 47c76661cb..1eb6710eff 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -113,6 +113,7 @@
| | ... | ${average} | ${stdev}
| | Set Test Variable | \${rate for teardown} | ${lower}
| | # Stats at the discovered critical rate.
+| | Set Test Variable | ${telemetry_oload} | plr
| | Send traffic at specified rate
| | ... | rate=${lower}
| | ... | trial_duration=${1.0}
@@ -196,12 +197,14 @@
| | ${pdr} = | Set Variable | ${result[1].measured_low.target_tr}
| | ${ndr} = | Set Variable | ${result[0].measured_low.target_tr}
| | # We expect NDR and PDR to have different-looking stats.
+| | Set Test Variable | ${telemetry_oload} | pdr
| | Send traffic at specified rate
| | ... | rate=${pdr}
| | ... | trial_duration=${1.0}
| | ... | trial_multiplicity=${1}
| | ... | use_latency=${use_latency}
| | ... | duration_limit=${1.0}
+| | Set Test Variable | ${telemetry_oload} | ndr
| | Run Keyword If | ${ndr} != ${pdr}
| | ... | Send traffic at specified rate
| | ... | rate=${ndr}
@@ -627,7 +630,6 @@
| | ... | transaction_scale=${transaction_scale}
| | ... | transaction_type=${transaction_type}
| | ... | use_latency=${use_latency}
-| | # TODO: Ramp-up?
| Stop Running Traffic
| | [Documentation]
@@ -672,6 +674,7 @@
| | ${unit} = | Set Variable If | """_cps""" in """${transaction_type}"""
| | ... | cps | pps
| | # The following also sets \${rate_for_teardown}
+| | Set Test Variable | ${telemetry_oload} | mrr
| | ${results} = | Send traffic at specified rate
| | ... | rate=${max_rate}
| | ... | trial_duration=${trial_duration}
diff --git a/resources/templates/telemetry/vpp_clear_stats.yaml b/resources/templates/telemetry/vpp_clear_stats.yaml
index 2188588827..72c20604ee 100644
--- a/resources/templates/telemetry/vpp_clear_stats.yaml
+++ b/resources/templates/telemetry/vpp_clear_stats.yaml
@@ -41,40 +41,50 @@ programs:
gauge:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
gauge:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
gauge:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
@@ -204,12 +254,16 @@ programs:
gauge:
- name: calls
documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
labelnames:
- name
- thread_name
- thread_id
- name: packets
documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
labelnames:
- name
- thread_name
diff --git a/resources/templates/telemetry/vpp_runtime.yaml b/resources/templates/telemetry/vpp_runtime.yaml
index b9a2368981..d7beb23cc6 100644
--- a/resources/templates/telemetry/vpp_runtime.yaml
+++ b/resources/templates/telemetry/vpp_runtime.yaml
@@ -38,24 +38,13 @@ scheduler:
programs:
- name: bundle_vpp
metrics:
- info:
- - name: version
- documentation: VPP version
- namespace: vpp
- subsystem: version
- labelnames:
- - version
- code: |
- show version
- - name: bundle_vpp
- metrics:
gauge:
- name: calls
documentation: Number of calls total
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -65,7 +54,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -75,7 +64,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -85,7 +74,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -95,7 +84,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -107,166 +96,12 @@ programs:
- name: bundle_vpp
metrics:
gauge:
- - name: rx_packets
- documentation: Number of received packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_bytes
- documentation: Number of received bytes for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_error
- documentation: Number of errors on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_packets
- documentation: Number of transitted packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_bytes
- documentation: Number of transitted bytes for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_error
- documentation: Number of errors on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: drops
- documentation: Number of dropped packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: punt
- documentation: Number of punted packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: ip4
- documentation: Number of IPv4 packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: ip6
- documentation: Number of IPv6 packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: mpls
- documentation: Number of MPLS packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_no_buf
- documentation: Number of out of buffer RX packets on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_miss
- documentation: Number of missed RX packets on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- code: |
- clear interfaces
- wait {duration}
- show interface
- - name: bundle_vpp
- metrics:
- gauge:
- - name: node_counter
- documentation: Node counter
- namespace: vpp
- subsystem: counters
- labelnames:
- - name
- - reason
- - severity
- - thread_name
- - thread_id
- code: |
- clear node counters
- wait {duration}
- show node counters verbose
- - name: bundle_vpp
- metrics:
- gauge:
- - name: context_switches
- documentation: Per-thread context switches
- namespace: vpp
- subsystem: context_switches
- labelnames:
- - name
- - id
- code: |
- perfmon reset
- perfmon start bundle context-switches
- wait {duration}
- perfmon stop
- show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- - name: minor_page_faults
- documentation: Per-thread page faults (minor)
- namespace: vpp
- subsystem: page_faults
- labelnames:
- - name
- - id
- - name: major_page_faults
- documentation: Per-thread page faults (major)
- namespace: vpp
- subsystem: page_faults
- labelnames:
- - name
- - id
- code: |
- perfmon reset
- perfmon start bundle page-faults
- wait {duration}
- perfmon stop
- show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- name: calls
documentation: Instructions/packet, cycles/packet and IPC (calls)
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: packets
@@ -274,7 +109,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: packets_per_call
@@ -282,7 +117,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: clocks_per_packets
@@ -290,7 +125,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: instructions_per_packets
@@ -298,7 +133,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: ipc
@@ -306,7 +141,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
code: |
@@ -323,7 +158,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l1_miss
@@ -331,7 +166,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l2_hit
@@ -339,7 +174,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l2_miss
@@ -347,7 +182,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l3_hit
@@ -355,7 +190,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l3_miss
@@ -363,7 +198,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
code: |
@@ -372,151 +207,3 @@ programs:
wait {duration}
perfmon stop
show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- - name: calls
- documentation: Load operations (calls)
- namespace: vpp
- subsystem: load_blocks
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: packets
- documentation: Load operations (packets)
- namespace: vpp
- subsystem: load_blocks
- labelnames:
- - name
- - thread_name
- - thread_id
- code: |
- perfmon reset
- perfmon start bundle load-blocks
- wait {duration}
- perfmon stop
- show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- - name: branches_per_call
- documentation: Branches/call
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: branches_per_packet
- documentation: Branches/packet
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: taken_per_call
- documentation: Taken/call
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: taken_per_packet
- documentation: Taken/packet
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: mis_predictions
- documentation: Mis-predictions
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- code: |
- perfmon reset
- perfmon start bundle branch-mispred
- wait {duration}
- perfmon stop
- show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- - name: lvl0
- documentation: Branches/call
- namespace: vpp
- subsystem: power_licensing
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: lvl1
- documentation: Branches/packet
- namespace: vpp
- subsystem: power_licensing
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: lvl2
- documentation: Taken/call
- namespace: vpp
- subsystem: power_licensing
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: throttle
- documentation: Taken/packet
- namespace: vpp
- subsystem: power_licensing
- labelnames:
- - name
- - thread_name
- - thread_id
- code: |
- perfmon reset
- perfmon start bundle power-licensing
- wait {duration}
- perfmon stop
- show perfmon statistics
- - name: bundle_vpp
- metrics:
- gauge:
- - name: runtime
- documentation: RunTime
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: reads_mbs
- documentation: Reads (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: writes_mbs
- documentation: Writes (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: total_mbs
- documentation: Total (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- code: |
- perfmon reset
- perfmon start bundle memory-bandwidth
- wait {duration}
- perfmon stop
- show perfmon statistics
diff --git a/resources/templates/telemetry/vpp_show_stats.yaml b/resources/templates/telemetry/vpp_show_stats.yaml
index dc900e6386..626839f410 100644
--- a/resources/templates/telemetry/vpp_show_stats.yaml
+++ b/resources/templates/telemetry/vpp_show_stats.yaml
@@ -41,40 +41,50 @@ programs:
counter:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
counter:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
counter:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
diff --git a/resources/templates/telemetry/vpp_test_teardown.yaml b/resources/templates/telemetry/vpp_test_teardown.yaml
index 37618bb852..ac096526ce 100644
--- a/resources/templates/telemetry/vpp_test_teardown.yaml
+++ b/resources/templates/telemetry/vpp_test_teardown.yaml
@@ -41,40 +41,50 @@ programs:
counter:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
counter:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
counter:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
diff --git a/resources/templates/telemetry/vppctl_clear_stats.yaml b/resources/templates/telemetry/vppctl_clear_stats.yaml
index 7c5124eb03..b23081e4f2 100644
--- a/resources/templates/telemetry/vppctl_clear_stats.yaml
+++ b/resources/templates/telemetry/vppctl_clear_stats.yaml
@@ -41,40 +41,50 @@ programs:
gauge:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
gauge:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
gauge:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
@@ -204,12 +254,16 @@ programs:
gauge:
- name: calls
documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
labelnames:
- name
- thread_name
- thread_id
- name: packets
documentation: Load operations
+ namespace: vpp
+ subsystem: perfmon
labelnames:
- name
- thread_name
diff --git a/resources/templates/telemetry/vppctl_runtime.yaml b/resources/templates/telemetry/vppctl_runtime.yaml
index d8ff734e84..2ac72c0b8a 100644
--- a/resources/templates/telemetry/vppctl_runtime.yaml
+++ b/resources/templates/telemetry/vppctl_runtime.yaml
@@ -38,24 +38,13 @@ scheduler:
programs:
- name: bundle_vppctl
metrics:
- info:
- - name: version
- documentation: VPP version
- namespace: vpp
- subsystem: version
- labelnames:
- - version
- code: |
- vppctl -s {socket} show version
- - name: bundle_vppctl
- metrics:
gauge:
- name: calls
documentation: Number of calls total
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -65,7 +54,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -75,7 +64,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -85,7 +74,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -95,7 +84,7 @@ programs:
namespace: vpp
subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -107,166 +96,12 @@ programs:
- name: bundle_vppctl
metrics:
gauge:
- - name: rx_packets
- documentation: Number of received packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_bytes
- documentation: Number of received bytes for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_error
- documentation: Number of errors on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_packets
- documentation: Number of transitted packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_bytes
- documentation: Number of transitted bytes for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: tx_error
- documentation: Number of errors on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: drops
- documentation: Number of dropped packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: punt
- documentation: Number of punted packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: ip4
- documentation: Number of IPv4 packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: ip6
- documentation: Number of IPv6 packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: mpls
- documentation: Number of MPLS packets for interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_no_buf
- documentation: Number of out of buffer RX packets on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- - name: rx_miss
- documentation: Number of missed RX packets on interface
- namespace: vpp
- subsystem: interface
- labelnames:
- - name
- - index
- code: |
- vppctl -s {socket} clear interfaces
- sleep {duration}
- vppctl -s {socket} show interface
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: node_counter
- documentation: Node counter
- namespace: vpp
- subsystem: counters
- labelnames:
- - name
- - reason
- - severity
- - thread_name
- - thread_id
- code: |
- vppctl -s {socket} clear node counters
- sleep {duration}
- vppctl -s {socket} show node counters verbose
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: context_switches
- documentation: Per-thread context switches
- namespace: vpp
- subsystem: context_switches
- labelnames:
- - name
- - id
- code: |
- vppctl -s {socket} perfmon reset
- vppctl -s {socket} perfmon start bundle context-switches
- sleep {duration}
- vppctl -s {socket} perfmon stop
- vppctl -s {socket} show perfmon statistics
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: minor_page_faults
- documentation: Per-thread page faults (minor)
- namespace: vpp
- subsystem: page_faults
- labelnames:
- - name
- - id
- - name: major_page_faults
- documentation: Per-thread page faults (major)
- namespace: vpp
- subsystem: page_faults
- labelnames:
- - name
- - id
- code: |
- vppctl -s {socket} perfmon reset
- vppctl -s {socket} perfmon start bundle page-faults
- sleep {duration}
- vppctl -s {socket} perfmon stop
- vppctl -s {socket} show perfmon statistics
- - name: bundle_vppctl
- metrics:
- gauge:
- name: calls
documentation: Instructions/packet, cycles/packet and IPC (calls)
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: packets
@@ -274,7 +109,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: packets_per_call
@@ -282,7 +117,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: clocks_per_packets
@@ -290,7 +125,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: instructions_per_packets
@@ -298,7 +133,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: ipc
@@ -306,7 +141,7 @@ programs:
namespace: vpp
subsystem: inst_and_clock
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
code: |
@@ -323,7 +158,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l1_miss
@@ -331,7 +166,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l2_hit
@@ -339,7 +174,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l2_miss
@@ -347,7 +182,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l3_hit
@@ -355,7 +190,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
- name: l3_miss
@@ -363,7 +198,7 @@ programs:
namespace: vpp
subsystem: cache_hierarchy
labelnames:
- - name
+ - node_name
- thread_name
- thread_id
code: |
@@ -372,110 +207,3 @@ programs:
sleep {duration}
vppctl -s {socket} perfmon stop
vppctl -s {socket} show perfmon statistics
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: calls
- documentation: Load operations (calls)
- namespace: vpp
- subsystem: load_blocks
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: packets
- documentation: Load operations (packets)
- namespace: vpp
- subsystem: load_blocks
- labelnames:
- - name
- - thread_name
- - thread_id
- code: |
- vppctl -s {socket} perfmon reset
- vppctl -s {socket} perfmon start bundle load-blocks
- sleep {duration}
- vppctl -s {socket} perfmon stop
- vppctl -s {socket} show perfmon statistics
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: branches_per_call
- documentation: Branches/call
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: branches_per_packet
- documentation: Branches/packet
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: taken_per_call
- documentation: Taken/call
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: taken_per_packet
- documentation: Taken/packet
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- - name: mis_predictions
- documentation: Mis-predictions
- namespace: vpp
- subsystem: branch_mispred
- labelnames:
- - name
- - thread_name
- - thread_id
- code: |
- vppctl -s {socket} perfmon reset
- vppctl -s {socket} perfmon start bundle branch-mispred
- sleep {duration}
- vppctl -s {socket} perfmon stop
- vppctl -s {socket} show perfmon statistics
- - name: bundle_vppctl
- metrics:
- gauge:
- - name: runtime
- documentation: RunTime
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: reads_mbs
- documentation: Reads (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: writes_mbs
- documentation: Writes (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- - name: total_mbs
- documentation: Total (MB/s)
- namespace: vpp
- subsystem: memory_bandwidth
- labelnames:
- - name
- code: |
- vppctl -s {socket} perfmon reset
- vppctl -s {socket} perfmon start bundle memory-bandwidth
- sleep {duration}
- vppctl -s {socket} perfmon stop
- vppctl -s {socket} show perfmon statistics
diff --git a/resources/templates/telemetry/vppctl_show_stats.yaml b/resources/templates/telemetry/vppctl_show_stats.yaml
index 83bb746773..9f5a0240a1 100644
--- a/resources/templates/telemetry/vppctl_show_stats.yaml
+++ b/resources/templates/telemetry/vppctl_show_stats.yaml
@@ -41,40 +41,50 @@ programs:
counter:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
counter:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
counter:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
diff --git a/resources/templates/telemetry/vppctl_test_teardown.yaml b/resources/templates/telemetry/vppctl_test_teardown.yaml
index 10f2077137..e8458f7198 100644
--- a/resources/templates/telemetry/vppctl_test_teardown.yaml
+++ b/resources/templates/telemetry/vppctl_test_teardown.yaml
@@ -41,40 +41,50 @@ programs:
counter:
- name: calls
documentation: Number of calls total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors
documentation: Number of vectors total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: suspends
documentation: Number of suspends total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: clocks
documentation: Number of clocks total
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
- thread_lcore
- name: vectors_calls
documentation: Number of vectors per call
+ namespace: vpp
+ subsystem: runtime
labelnames:
- - name
+ - node_name
- state
- thread_name
- thread_id
@@ -86,66 +96,92 @@ programs:
counter:
- name: rx_packets
documentation: Number of received packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of received bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_packets
documentation: Number of transitted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of transitted bytes for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: tx_error
documentation: Number of errors on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: drops
documentation: Number of dropped packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: punt
documentation: Number of punted packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip4
documentation: Number of IPv4 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: ip6
documentation: Number of IPv6 packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: mpls
documentation: Number of MPLS packets for interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_no_buf
documentation: Number of out of buffer RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
- name: rx_miss
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: interface
labelnames:
- name
- index
@@ -156,31 +192,43 @@ programs:
gauge:
- name: rx_frames
documentation: Number of RX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_bytes
documentation: Number of RX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_frames
documentation: Number of TX frames for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_bytes
documentation: Number of TX bytes for interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: rx_missed
documentation: Number of missed RX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
- name: tx_missed
documentation: Number of missed TX packets on interface
+ namespace: vpp
+ subsystem: hardware
labelnames:
- name
- index
@@ -191,6 +239,8 @@ programs:
counter:
- name: node_counter
documentation: Node counter
+ namespace: vpp
+ subsystem: node
labelnames:
- name
- reason
diff --git a/resources/tools/telemetry/bundle_perf_stat.py b/resources/tools/telemetry/bundle_perf_stat.py
index 17afbe0824..471dd07b18 100644
--- a/resources/tools/telemetry/bundle_perf_stat.py
+++ b/resources/tools/telemetry/bundle_perf_stat.py
@@ -91,10 +91,16 @@ class BundlePerfStat:
def detach(self):
+ """
+ Detach function.
+ """
pass
def fetch_data(self):
- pass
+ """
+ Fetch data function.
+ """
+ pass
def process_data(self):
"""
diff --git a/resources/tools/telemetry/bundle_vppctl.py b/resources/tools/telemetry/bundle_vppctl.py
index 5334237496..d0ee3754c7 100644
--- a/resources/tools/telemetry/bundle_vppctl.py
+++ b/resources/tools/telemetry/bundle_vppctl.py
@@ -30,7 +30,7 @@ M_RUN_SEPARATOR = (
r"(-)+"
)
M_RUN_NODES = (
- r"(?P<name>\S+)\s+"
+ r"(?P<node_name>\S+)\s+"
r"(?P<state>\S+\s\S+|\S+)\s+"
r"(?P<calls>\d+)\s+"
r"(?P<vectors>\d+)\s+"
@@ -284,7 +284,7 @@ class BundleVppctl:
item = dict()
labels = dict()
item["name"] = metric
- labels["name"] = nodes["name"]
+ labels["node_name"] = nodes["node_name"]
labels["state"] = nodes["state"]
try:
labels["thread_name"] = thread["thread_name"]
@@ -364,7 +364,7 @@ class BundleVppctl:
item = dict()
labels = dict()
item["name"] = metric
- labels["name"] = node["node_name"]
+ labels["node_name"] = node["node_name"]
labels["thread_name"] = thread["thread_name"]
labels["thread_id"] = thread["thread_id"]
item["labels"] = labels
diff --git a/resources/tools/telemetry/constants.py b/resources/tools/telemetry/constants.py
index 5363ddeaa4..d5641ede2d 100644
--- a/resources/tools/telemetry/constants.py
+++ b/resources/tools/telemetry/constants.py
@@ -50,4 +50,3 @@ class Constants:
# Could not successfuly run perf stat command
err_linux_perf_stat = 53
-
diff --git a/resources/tools/telemetry/metrics.py b/resources/tools/telemetry/metrics.py
index 7a22acfd1b..27fad89a5c 100644
--- a/resources/tools/telemetry/metrics.py
+++ b/resources/tools/telemetry/metrics.py
@@ -104,7 +104,7 @@ class Metric:
u"Sample", [u"name", u"labels", u"value", u"timestamp"]
)
- if not re.compile(r"^[a-zA-Z_:][a-zA-Z0-9_:]*$").match(name):
+ if not re.compile(r"^[a-zA-Z._:][a-zA-Z0-9._:]*$").match(name):
raise ValueError(f"Invalid metric name: {name}!")
if typ not in self.metric_types:
raise ValueError(f"Invalid metric type: {typ}!")
@@ -210,11 +210,11 @@ class MetricBase:
:rasies ValueError: If name does not conform with naming conventions.
"""
full_name = u""
- full_name += f"{namespace}_" if namespace else u""
- full_name += f"{subsystem}_" if subsystem else u""
+ full_name += f"{namespace}." if namespace else u""
+ full_name += f"{subsystem}." if subsystem else u""
full_name += name
- if not re.compile(r"^[a-zA-Z_:][a-zA-Z0-9_:]*$").match(full_name):
+ if not re.compile(r"^[a-zA-Z._:][a-zA-Z0-9._:]*$").match(full_name):
raise ValueError(
f"Invalid metric name: {full_name}!"
)