-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Changes from 1 commit
9d31671
63772bb
ed8f414
fcd7c2d
76ec09f
705fb96
faf8bbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# License: Apache 2.0. See LICENSE file in root directory. | ||
# Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
|
||
# test:device D400* | ||
|
||
import pyrealsense2 as rs | ||
from rspy.stopwatch import Stopwatch | ||
from rspy import test, log | ||
import time | ||
import platform | ||
|
||
|
||
# Start depth + color streams and measure the time from stream opened until first frame arrived using pipeline API. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You also run IMU, better to write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed |
||
# Verify that the time do not exceeds the maximum time allowed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
# Note - Using Windows Media Foundation to handle power management between USB actions take time (~27 ms) | ||
|
||
|
||
# Set maximum delay for first frame according to product line | ||
dev = test.find_first_device_or_exit() | ||
|
||
def verify_frame_received(config): | ||
pipe = rs.pipeline() | ||
start_call_stopwatch = Stopwatch() | ||
pipe.start(config) | ||
f = pipe.wait_for_frames() | ||
delay = start_call_stopwatch.get_elapsed() | ||
log.out("After ", delay, " [sec] got first frame of ", f) | ||
pipe.stop() | ||
|
||
|
||
################################################################################################ | ||
test.start("Testing pipeline start/stop stress test") | ||
for i in range(10): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its a mini stress test.. |
||
log.out("starting iteration #", i, "/", 10) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
cfg = rs.config() | ||
cfg.enable_all_streams() | ||
verify_frame_received(cfg) | ||
test.finish() | ||
|
||
################################################################################################ | ||
test.print_results_and_exit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only D400?
There was a problem hiding this comment.
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