Skip to content

Commit 751edfa

Browse files
committed
Reduce sleep times to a hard set 10ms for stop/start portion
1 parent 8108e93 commit 751edfa

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/demo/com/amazonaws/kinesisvideo/demoapp/DemoAppBenchmarking.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ public static void main(final String[] args) {
7878
for (int i = 0; i < mediaSources.length; i++) {
7979
log.warn("Stopping stream {}", i);
8080
kinesisVideoClient.unregisterMediaSource(mediaSources[i]);
81-
log.warn("Sleeping for {} ms", STREAM_INTERVAL_MS);
82-
Thread.sleep(STREAM_INTERVAL_MS);
81+
log.warn("Sleeping for {} ms", 10);
82+
Thread.sleep(10);
8383
}
8484

85-
log.warn("Sleeping for 60 seconds to allow streams to stabilize");
86-
Thread.sleep(60000);
85+
log.warn("Sleeping for 300 seconds to allow streams to stabilize");
86+
Thread.sleep(300000);
8787

8888
for (int i = 0; i < mediaSources.length; i++) {
8989
log.warn("Starting stream {}", i);
@@ -92,13 +92,13 @@ public static void main(final String[] args) {
9292
kinesisVideoClient.registerMediaSource(mediaSources[i]);
9393
mediaSources[i].start();
9494

95-
log.warn("Sleeping for {} ms", STREAM_INTERVAL_MS);
96-
Thread.sleep(STREAM_INTERVAL_MS);
95+
log.warn("Sleeping for {} ms", 10);
96+
Thread.sleep(10);
9797
}
9898

9999
log.warn("Done stopping and starting streams");
100-
log.warn("Sleeping for 60 seconds to allow streams to stabilize");
101-
Thread.sleep(60000);
100+
log.warn("Sleeping for 300 seconds to allow streams to stabilize");
101+
Thread.sleep(300000);
102102
}
103103

104104
// Stop the streams
@@ -132,7 +132,7 @@ private static MediaSource createImageFileMediaSource(String streamNameSuffix) {
132132
//.contentType("video/hevc") // for h265
133133
.allowStreamCreation(false)
134134
.build();
135-
final ImageFileMediaSource mediaSource = new ImageFileMediaSource(STREAM_NAME + "_" + streamNameSuffix);
135+
final ImageFileMediaSource mediaSource = new ImageFileMediaSource(STREAM_NAME + "-" + streamNameSuffix);
136136
mediaSource.configure(configuration);
137137

138138
return mediaSource;

0 commit comments

Comments
 (0)