Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a short stress test for start/stop #11664

Merged
merged 7 commits into from
Apr 13, 2023

Conversation

Nir-Az
Copy link
Collaborator

@Nir-Az Nir-Az commented Apr 10, 2023

Tracked on [LRS-751]

Test result

-D- found <pyrealsense2.device: Intel RealSense D435 (S/N: 722312070458  FW: 5.14.0  UNLOCKED  on USB3.2)>
-D- in <module 'pyrealsense2' from 'C:\\jenkins_sys_rsbuild\\workspace\\LRS_windows_compile_pipeline\\win10\\win64\\static\\RelWithDebInfo\\pyrealsense2.cp37-win_amd64.pyd'>
Testing pipeline start/stop stress test
starting iteration # 1 / 10
After  0.7407785  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #7 @1681135427247.455566>
starting iteration # 2 / 10
After  0.7779392  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #7 @1681135429736.040771>
starting iteration # 3 / 10
After  0.7775243999999999  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #7 @1681135432275.888184>
starting iteration # 4 / 10
After  0.7821805  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #2 @1681135435088.820068>
starting iteration # 5 / 10
After  0.7463107999999998  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #7 @1681135437345.772949>
starting iteration # 6 / 10
After  0.7443069999999992  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #2 @1681135440118.626709>
starting iteration # 7 / 10
After  0.7465039000000004  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #0 @1681135442537.441406>
starting iteration # 8 / 10
After  0.7834516000000029  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #0 @1681135445262.806396>
starting iteration # 9 / 10
After  0.7375328000000003  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #2 @1681135447820.812012>
starting iteration # 10 / 10
After  0.7451611999999983  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 #0 @1681135450278.246094>
Test passed

___
All tests passed (0 assertions in 1 test cases)

----------TEST-SEPARATOR----------

-D- found <pyrealsense2.device: Intel RealSense D455 (S/N: 114222251278  FW: 5.14.0  UNLOCKED  on USB3.2)>
-D- in <module 'pyrealsense2' from 'C:\\jenkins_sys_rsbuild\\workspace\\LRS_windows_compile_pipeline\\win10\\win64\\static\\RelWithDebInfo\\pyrealsense2.cp37-win_amd64.pyd'>
Testing pipeline start/stop stress test
starting iteration # 1 / 10
After  1.0972542  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #6 @1681135455121.212891>
starting iteration # 2 / 10
After  1.0288057999999998  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #7 @1681135460052.879395>
starting iteration # 3 / 10
After  0.8258337000000004  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135464815.625488>
starting iteration # 4 / 10
After  0.7924810999999998  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135469714.635742>
starting iteration # 5 / 10
After  0.9951992000000018  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135474578.448975>
starting iteration # 6 / 10
After  0.8303162000000022  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135479437.717529>
starting iteration # 7 / 10
After  1.0722765999999986  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135484335.053223>
starting iteration # 8 / 10
After  0.8278710999999959  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135489174.121338>
starting iteration # 9 / 10
After  0.8337026999999964  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135494040.557373>
starting iteration # 10 / 10
After  0.8296413999999999  [sec] got first frame of  <pyrealsense2.frameset Z16 Y8 Y8 RGB8 MOTION_XYZ32F MOTION_XYZ32F #5 @1681135498914.182129>
Test passed

___
All tests passed (0 assertions in 1 test cases)

# License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2023 Intel Corporation. All Rights Reserved.

# test:device D400*
Copy link
Contributor

Choose a reason for hiding this comment

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

Why only D400?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Other are about to be deprecated, no need to add run time for them


################################################################################################
test.start("Testing pipeline start/stop stress test")
for i in range(10):
Copy link
Contributor

Choose a reason for hiding this comment

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

10 is not "stress" test. Can you add a test case that will run only on nightly context with 1000 iterations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its a mini stress test..
RealCI covers more.
The main idea is to see multiple start stop works.
1 min is enough

################################################################################################
test.start("Testing pipeline start/stop stress test")
for i in range(10):
log.out("starting iteration #", i, "/", 10)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use i + 1 now last iteration is 9/10

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

import platform


# Start depth + color streams and measure the time from stream opened until first frame arrived using pipeline API.
Copy link
Contributor

Choose a reason for hiding this comment

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

You also run IMU, better to write Start all streams...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed



# Start depth + color streams and measure the time from stream opened until first frame arrived using pipeline API.
# Verify that the time do not exceeds the maximum time allowed
Copy link
Contributor

Choose a reason for hiding this comment

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

does not

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

pipe = rs.pipeline()
start_call_stopwatch = Stopwatch()
pipe.start(config)
# wait_for_frames will through if no frames received so no assert is needed
Copy link
Contributor

Choose a reason for hiding this comment

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

throw

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@Nir-Az Nir-Az merged commit 5aec3fd into IntelRealSense:development Apr 13, 2023
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