test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/vm2vm_virtio_pmd_*: perf top command optimization
@ 2023-05-29 16:00 Dukai Yuan
  2023-06-07  5:56 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Dukai Yuan @ 2023-05-29 16:00 UTC (permalink / raw)
  To: dts; +Cc: Dukai Yuan

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(-)

diff --git a/tests/TestSuite_dpdk_gro_lib_cbdma.py b/tests/TestSuite_dpdk_gro_lib_cbdma.py
index 23a55686..0ce250ef 100644
--- a/tests/TestSuite_dpdk_gro_lib_cbdma.py
+++ b/tests/TestSuite_dpdk_gro_lib_cbdma.py
@@ -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)
diff --git a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
index 0507e9ca..76508939 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
@@ -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)
diff --git a/tests/TestSuite_vm2vm_virtio_pmd_dsa.py b/tests/TestSuite_vm2vm_virtio_pmd_dsa.py
index 6ae9f165..34d62ada 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd_dsa.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd_dsa.py
@@ -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)
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts][PATCH V1] tests/vm2vm_virtio_pmd_*: perf top command optimization
  2023-05-29 16:00 [dts][PATCH V1] tests/vm2vm_virtio_pmd_*: perf top command optimization Dukai Yuan
@ 2023-06-07  5:56 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-06-07  5:56 UTC (permalink / raw)
  To: dts, Dukai Yuan; +Cc: Dukai Yuan

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-07  5:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 16:00 [dts][PATCH V1] tests/vm2vm_virtio_pmd_*: perf top command optimization Dukai Yuan
2023-06-07  5:56 ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).