[V1] tests/vm2vm_virtio_pmd_*: perf top command optimization
Checks
Context |
Check |
Description |
ci/Intel-dts-format-test |
success
|
Testing OK
|
ci/Intel-dts-pylama-test |
success
|
Testing OK
|
ci/Intel-dts-suite-test |
warning
|
SKIPPED
|
Commit Message
Using the command perf top -p <pid> > <log_file> can monitor only the specified PID process and record its output to a file,
which can avoid mixing information from other processes in the output file
and enable us to better monitor the performance of the specified process.
Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
tests/TestSuite_dpdk_gro_lib_cbdma.py | 3 ++-
tests/TestSuite_vm2vm_virtio_pmd_cbdma.py | 3 ++-
tests/TestSuite_vm2vm_virtio_pmd_dsa.py | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
Comments
On Mon, 29 May 2023 16:00:26 +0000, Dukai Yuan <dukaix.yuan@intel.com> wrote:
> Using the command perf top -p <pid> > <log_file> can monitor only the specified PID process and record its output to a file,
> which can avoid mixing information from other processes in the output file
> and enable us to better monitor the performance of the specified process.
>
> Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
@@ -155,7 +155,8 @@ class TestDPDKGROLibCbdma(TestCase):
def get_and_verify_func_name_of_perf_top(self, func_name_list):
self.dut.send_expect("rm -fr perf_top.log", "# ", 120)
- self.dut.send_expect("perf top > perf_top.log", "", 120)
+ pid = self.dut.send_expect("pidof dpdk-testpmd", "# ", 120)
+ self.dut.send_expect("perf top -p %s > perf_top.log" % pid, "", 120)
time.sleep(10)
self.dut.send_expect("^C", "#")
out = self.dut.send_expect("cat perf_top.log", "# ", 120)
@@ -165,7 +165,8 @@ class TestVM2VMVirtioPmdCBDMA(TestCase):
def get_and_verify_func_name_of_perf_top(self, func_name_list):
self.dut.send_expect("rm -fr perf_top.log", "# ", 120)
- self.dut.send_expect("perf top > perf_top.log", "", 120)
+ pid = self.dut.send_expect("pidof dpdk-testpmd", "# ", 120)
+ self.dut.send_expect("perf top -p %s > perf_top.log" % pid, "", 120)
time.sleep(10)
self.dut.send_expect("^C", "#")
out = self.dut.send_expect("cat perf_top.log", "# ", 120)
@@ -208,7 +208,8 @@ class TestVM2VMVirtioPmdDsa(TestCase):
def get_and_verify_func_name_of_perf_top(self, func_name_list):
time.sleep(10)
self.dut.send_expect("rm -fr perf_top.log", "# ", 120)
- self.dut.send_expect("perf top > perf_top.log", "", 120)
+ pid = self.dut.send_expect("pidof dpdk-testpmd", "# ", 120)
+ self.dut.send_expect("perf top -p %s > perf_top.log" % pid, "", 120)
time.sleep(30)
self.dut.send_expect("^C", "#")
out = self.dut.send_expect("cat perf_top.log", "# ", 120)