Top Banner
Using JMeter for Performance Testing Live Streaming Applications Presented by BlazeMeter a CA Technologies Company Sep 6, 2017
20

Using JMeter for Performance Testing Live Streaming Applications

Jan 28, 2018

Download

Technology

BlazeMeter
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using JMeter for Performance Testing Live Streaming Applications

Using JMeter for Performance Testing Live Streaming Applications

Presented by BlazeMeter a CA Technologies Company

Sep 6, 2017

Page 2: Using JMeter for Performance Testing Live Streaming Applications

AGENDA

• Intro• HLS Overview• HLS & JMeter Old Style• HLS & JMeter New Style• Q&A

Page 3: Using JMeter for Performance Testing Live Streaming Applications

What a long strange trip it’s been...

Dave Karow { Developer Advocate } @davekarow

Keynote Systems (7 years)- Load Testing- Synthetic Monitoring

dynatrace

SOASTA

BlazeMeter

CA Technologies Continuous Delivery

Page 4: Using JMeter for Performance Testing Live Streaming Applications

HLS Overview

HLS = HTTP Live Streaming• Uses only http/https (remember real media?)

– Proxy/firewall friendly– Served from any http server/CDN

• Adaptive Bitrate: Degrades instead of stalling– Multiple stream variants (by bandwidth/resolution)– Client chooses/re-chooses best stream

Page 5: Using JMeter for Performance Testing Live Streaming Applications

HLS Components

1. Encoding/Encapsulation: Transcoder

a. The “heavy lifting” (CPU intensive)

b. Outputs:

i. .m3u8 master index (list of variants)

ii. .m3u8 variant index (list of segments)

iii. .ts file containing each segment

Page 6: Using JMeter for Performance Testing Live Streaming Applications

HLS Components

1. Encoding/Encapsulation: Transcoder

2. Distribution: Web Server/CDN/Proxy

3. Client: Mobile Device, js in Browser, etc...

Our Focus Today

Page 7: Using JMeter for Performance Testing Live Streaming Applications

1. Get master playlist for “about_demo” videoGET http://hls.demoblaze.com/index.m3u8

2. Parse master playlist for list of variants, choose one(let’s assume low bandwidth environment, so lowest resolution to start)

3. Get variant playlist matching bandwidth/resolutionGET http://hls.demoblaze.com/about_demo_hls_600k.m3u8

4. Get and play fragment from variant playlistGET http://hls.demoblaze.com/about_demo_hls_600k00000.ts

5. If live: Go back to #1 to get new master playlist

HLS Playback Flow @ High Level

Page 8: Using JMeter for Performance Testing Live Streaming Applications

GET http://hls.demoblaze.com/index.m3u8

#EXTM3U

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=8674000,RESOLUTION=1024x576,CODECS="avc1.4d001f,mp4a.40.2"

about_demo_hls_2M.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=7633000,RESOLUTION=960x540,CODECS="avc1.4d001f,mp4a.40.2"

about_demo_hls_1-5M.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3733000,RESOLUTION=640x360,CODECS="avc1.4d001f,mp4a.40.2"

about_demo_hls_1M.m3u8

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2624000,RESOLUTION=480x270,CODECS="avc1.42001e,mp4a.40.2"

about_demo_hls_600k.m3u8

list of variants by bandwidth/resolution

The Master Playlist

Page 9: Using JMeter for Performance Testing Live Streaming Applications

GET http://hls.demoblaze.com/about_demo_hls_600k.m3u8

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-MEDIA-SEQUENCE:0

#EXT-X-ALLOW-CACHE:YES

#EXT-X-TARGETDURATION:13

#EXTINF:12.066667,

about_demo_hls_2M00000.ts

#EXTINF:9.000000,

about_demo_hls_2M00001.ts

#EXTINF:9.000000,

about_demo_hls_2M00002.ts

list of fragments for that variant

Variant Playlist

Page 10: Using JMeter for Performance Testing Live Streaming Applications

GET http://hls.demoblaze.com/about_demo_hls_600k00000.ts

(ts = transport stream fragment)

Fragment

Page 11: Using JMeter for Performance Testing Live Streaming Applications

As Seen By BlazeMeter Chrome Extension

Master Playlist (m3u8)

Variant Playlist (m3u8)

Fragments (.ts)

Faster Variant Playlist

Fragments (.ts)

Page 12: Using JMeter for Performance Testing Live Streaming Applications

Let’s Do A Live Demo

Page 13: Using JMeter for Performance Testing Live Streaming Applications

Many Pieces...Scripting in JMeter: Old Style

Page 14: Using JMeter for Performance Testing Live Streaming Applications

HLS Sampler Plug-InScripting in JMeter: New Style

Page 15: Using JMeter for Performance Testing Live Streaming Applications

HLS Sampler Plug-InScripting in JMeter: New Style

Page 16: Using JMeter for Performance Testing Live Streaming Applications

Adding Assertions

Assertions can be raised against:• Master Playlist• Variant Playlist

Example Assertions:• Response Assertion• Duration Assertion

Page 17: Using JMeter for Performance Testing Live Streaming Applications

Adding Assertions

Page 18: Using JMeter for Performance Testing Live Streaming Applications

Wrapping Up

The HLS Sampler plugin is open-source.

Pull requests are welcomed!

1. Go to jmeter-plugins.org2. Search “hls”and click on “HLS Sampler”3. That puts you in Git-Hub: jump right in!

Page 19: Using JMeter for Performance Testing Live Streaming Applications

Q&A Time

Page 20: Using JMeter for Performance Testing Live Streaming Applications

Next Steps

● Add the HLS Sampler via Plugins Manager or by

visiting jmeter-plugins.org

● Create your free account at blazemeter.com

● Performance Testing Blog – blazemeter.com/blog

● Learning Resources – blazemeter.com/resources

● Quick Survey @ Webinar Exit – Thanks!