X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppCounters.py;h=e9b607b4f1b5a57d679c75147c5df9134c64fba4;hb=3289b49cd2f08f9aae43959e0d5778617379388f;hp=411302ae580a1c1c9a3afac1a62276b5be338f7a;hpb=3ff919f8eb9fa7eb98887f029be7f817de7a1303;p=csit.git diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py index 411302ae58..e9b607b4f1 100644 --- a/resources/libraries/python/VppCounters.py +++ b/resources/libraries/python/VppCounters.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -112,6 +112,8 @@ class VppCounters: f"stats runtime ({node[u'host']} - {socket}):\n" f"{pformat(runtime_nz)}" ) + # Run also the CLI command, the above sometimes misses some info. + PapiSocketExecutor.run_cli_cmd_on_all_sockets(node, u"show runtime") @staticmethod def vpp_show_runtime_on_all_duts(nodes): @@ -125,8 +127,8 @@ class VppCounters: VppCounters.vpp_show_runtime(node) @staticmethod - def vpp_show_interface(node): - """Run "show interface" debug CLI command. + def vpp_show_hardware(node): + """Run "show hardware" debug CLI command. :param node: Node to run command on. :type node: dict @@ -182,8 +184,8 @@ class VppCounters: VppCounters.vpp_clear_runtime(node) @staticmethod - def vpp_clear_interfaces(node): - """Run "clear interfaces" CLI command. + def vpp_clear_hardware(node): + """Run "clear hardware" CLI command. :param node: Node to run command on. :type node: dict @@ -191,19 +193,19 @@ class VppCounters: :rtype: dict """ PapiSocketExecutor.run_cli_cmd_on_all_sockets( - node, u"clear interfaces", log=False + node, u"clear hardware", log=False ) @staticmethod - def vpp_clear_interfaces_on_all_duts(nodes): - """Clear interfaces on all DUTs. + def vpp_clear_hardware_on_all_duts(nodes): + """Clear hardware on all DUTs. :param nodes: VPP nodes. :type nodes: dict """ for node in nodes.values(): if node[u"type"] == NodeType.DUT: - VppCounters.vpp_clear_interfaces(node) + VppCounters.vpp_clear_hardware(node) @staticmethod def vpp_clear_errors(node): @@ -229,13 +231,13 @@ class VppCounters: @staticmethod def show_vpp_statistics(node): - """Show [error, hardware, interface] stats. + """Show [errors, hardware] stats. :param node: VPP node. :type node: dict """ VppCounters.vpp_show_errors(node) - VppCounters.vpp_show_interface(node) + VppCounters.vpp_show_hardware(node) @staticmethod def show_statistics_on_all_duts(nodes): @@ -250,13 +252,13 @@ class VppCounters: @staticmethod def clear_vpp_statistics(node): - """Clear [error, hardware, interface] stats. + """Clear [errors, hardware] stats. :param node: VPP node. :type node: dict """ VppCounters.vpp_clear_errors(node) - VppCounters.vpp_clear_interfaces(node) + VppCounters.vpp_clear_hardware(node) @staticmethod def clear_statistics_on_all_duts(nodes):