Skip to content

lf_multi_traffic.py: Run multiple traffic tests in series or parallel.#57

Open
Sidartha-CT wants to merge 1 commit into
masterfrom
multitraffictest
Open

lf_multi_traffic.py: Run multiple traffic tests in series or parallel.#57
Sidartha-CT wants to merge 1 commit into
masterfrom
multitraffictest

Conversation

@Sidartha-CT
Copy link
Copy Markdown
Collaborator

Verified CLI : python3 lf_multi_traffic.py --mgr 192.168.247.77 --upstream_port eth2 --parallel_tests ping_test,qos_test,ftp_test,http_test,mcast_test,vs_test,thput_test --ping_target www.google.com --ping_interval 5 --ping_duration 1 --ping_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --qos_tos VO,VI,BE,BK --qos_duration 1m --qos_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --qos_traffic_type lf_tcp --qos_download 10000000 --ftp_duration 1m --ftp_file_size 5MB --ftp_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --ftp_bands 5G --http_duration 1m --http_file_size 5MB --http_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --http_bands 5G --mcast_tos VO --mcast_test_duration 1m --mcast_side_b_min_bps 10000000 --mcast_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --mcast_endp_type mc_udp --vs_url https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8 --vs_media_source hls --vs_media_quality 4k --vs_duration 1m --vs_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --thput_test_duration 1m --thput_traffic_type lf_udp --thput_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --thput_upload 10000000 --no_cleanup

Comment thread py-scripts/lf_multi_traffic.py Outdated
bool: False if the test was stopped by the user, True otherwise.
"""
try:
print("ENTERED STOP CHECKKK")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the print statement

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Comment thread py-scripts/lf_multi_traffic.py Outdated
logging.info('Test is stopped by the user')
self.test_stopped = True
if not self.test_stopped:
print("ENTERED NOT STOPPED")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Comment thread py-scripts/lf_multi_traffic.py Outdated
pids = stdout.read().decode().strip().splitlines()

if pids:
print(f"Processes using port {port}: {', '.join(pids)}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add logger

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Comment thread py-scripts/lf_multi_traffic.py Outdated
if "zoom_test" in self.parallel_tests:
logger.info("Waiting for Zoom test rotation to finish")
self.zoom_rotate_done_event.wait()
# print("222",self.robot_move_event.is_set(),"---",self.ftp_done_event.is_set(),"---",self.http_done_event.is_set())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the print statements. It would also be good to mention the function's return values in the docstring.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

"""
Wait for all active parallel tests to completely finish their execution.
"""
# print(self.qos_done_event.is_set(),"---",self.ftp_done_event.is_set(),"---",self.http_done_event.is_set())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return value in doc string

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Comment thread py-scripts/lf_multi_traffic.py Outdated
})
df1 = pd.DataFrame(temp_json)
df1.to_csv('{}/ping_datavalues.csv'.format(self.result_dir), index=False)
# try:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the commented lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

host=mgr_ip,
port=mgr_port,
url=url,
duration=duration,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

host=mgr_ip,
port=mgr_port,
url=url,
duration=duration,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

host=mgr_ip,
port=mgr_port,
url=url,
duration=duration,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

host=mgr_ip,
port=mgr_port,
url=url,
duration=duration,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add a docstring

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

host=mgr_ip,
port=mgr_port,
url=url,
duration=duration,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arguments section is really well segregated @Sidartha-CT

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glad you liked it! @kadalinikhita

Verified CLI : python3 lf_multi_traffic.py --mgr 192.168.247.77 --upstream_port eth2 --parallel_tests ping_test,qos_test,ftp_test,http_test,mcast_test,vs_test,thput_test --ping_target www.google.com --ping_interval 5 --ping_duration 1 --ping_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --qos_tos VO,VI,BE,BK --qos_duration 1m --qos_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --qos_traffic_type lf_tcp --qos_download 10000000 --ftp_duration 1m --ftp_file_size 5MB --ftp_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --ftp_bands 5G --http_duration 1m --http_file_size 5MB --http_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --http_bands 5G --mcast_tos VO --mcast_test_duration 1m --mcast_side_b_min_bps 10000000 --mcast_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --mcast_endp_type mc_udp --vs_url https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8 --vs_media_source hls --vs_media_quality 4k --vs_duration 1m --vs_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --thput_test_duration 1m --thput_traffic_type lf_udp --thput_device_list 1.15,1.11,1.23,1.13,1.25,1.18,1.29,1.28,1.30,1.14 --thput_upload 10000000 --no_cleanup

Signed-off-by: Sidartha-CT <neelapu.sidartha@candelatech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants