Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automating Web Performance Testing with Phantom...
Search
Wesley Hales
March 11, 2015
Technology
1
410
Automating Web Performance Testing with PhantomJS 2
Given at DevNexus 2015
Wesley Hales
March 11, 2015
Tweet
Share
More Decks by Wesley Hales
See All by Wesley Hales
High Performance WebSocket
wesleyhales
1
590
Writing Real Time Web Apps (Updated)
wesleyhales
0
65
Writing Real Time Web Apps
wesleyhales
1
230
A Baseline for Web Performance with PhantomJS
wesleyhales
9
1.3k
Other Decks in Technology
See All in Technology
マルチロールEMが実践する「組織のレジリエンス」を高めるための組織構造と人材配置戦略
coconala_engineer
3
520
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
22k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
Claude Codeの進化と各機能の活かし方
oikon48
17
7.5k
IBM Bobを使って、PostgreSQLのToDoアプリをDb2へ変換してみよう/202603_Dojo_Bob
mayumihirano
0
180
管理者向けGitHub Enterpriseの運用Tips紹介: 人にもAIにも優しいプラットフォームづくり
yuriemori
0
160
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.6k
vLLM Community Meetup Tokyo #3 オープニングトーク
jpishikawa
0
190
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.9k
Evolution of Claude Code & How to use features
oikon48
1
450
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
350
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
130
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Automating Front-end Workflow
addyosmani
1370
200k
Claude Code のすすめ
schroneko
67
220k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
Believing is Seeing
oripsolob
1
72
Crafting Experiences
bethany
1
79
4 Signs Your Business is Dying
shpigford
187
22k
KATA
mclloyd
PRO
35
15k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
87
Transcript
Automating Web Performance Testing with PhantomJS 2 Wesley Hales Shape
Security @wesleyhales
Measuring Page Load Time @wesleyhales
Date.now() || Date().getTime() • When was the page loaded? •
Add an event listener • Get the current time • Profit • Example: Simple.html @wesleyhales
However... • JavaScript time is notoriously inaccurate • It is
skewed by adjustments to the system clock • it can’t provide any data regarding the server, network, and so on. • Example: all-old.html (add HRT) @wesleyhales
DOMContentLoaded • document has been completely loaded and parsed. •
stylesheets, images, and subframes have not finished loading @wesleyhales
load || onload The load event is fired when a
resource and its dependent resources have finished loading. @wesleyhales
readyState • "loading" while the document is loading • "interactive"
once it is finished parsing (but still loading sub-resources) • "complete" once it has loaded. @wesleyhales
Basic loading and blocking Demo @wesleyhales
Enter Navigation Timing API Navigation Timing is a JavaScript API
for accurately measuring performance on the web. @wesleyhales
HRT • The timestamps returned by Performance. now() are up
to microsecond precision. • Example: perf.now.html
@wesleyhales
@wesleyhales
window.performance simple-new.html Demo @wesleyhales
PhantomJS 2 • Released January 2015 • Headless Web browser
• Based on QTWebkit @wesleyhales
PhantomJS 2 Feature Detect @wesleyhales
Basic PhantomJS && http://phantomjs. org/examples/ Demo @wesleyhales
@wesleyhales
Loadreport.js (2012-2015) @wesleyhales
Speedgun.js • Rewrite of loadreport.js • Leverages all implemented PhantomJS
2 Navigation Timing APIs • (shims resource timing) @wesleyhales
Speedgun.js @wesleyhales
Speedgun.js Demo @wesleyhales
Speedgun.io • Allows Speedgun.js to run as a service •
Dockerized • New term… Synthetic RUM @wesleyhales
Speedgun.io Demo @wesleyhales
RUM Real user monitoring (RUM) is a passive monitoring technology
that records all user interaction with a website or client interacting with a server or cloud-based application. @wesleyhales
Synthetic RUM? • Use Speedgun.io as centralized server • All
docker nodes send beacon with: ◦ Current container CPU and memory usage • Yes, another demo... @wesleyhales
Thanks!! • speedgun.io (github) • Navigation Timing API • Navigation
Timing 2 • Resource Timing API