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
400
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
490
Writing Real Time Web Apps (Updated)
wesleyhales
0
61
Writing Real Time Web Apps
wesleyhales
1
210
A Baseline for Web Performance with PhantomJS
wesleyhales
9
1.2k
Other Decks in Technology
See All in Technology
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
530
Classmethod AI Talks(CATs) #17 司会進行スライド(2025.02.19) / classmethod-ai-talks-aka-cats_moderator-slides_vol17_2025-02-19
shinyaa31
0
100
CZII - CryoET Object Identification 参加振り返り・解法共有
tattaka
0
340
AndroidデバイスにFTPサーバを建立する
e10dokup
0
250
RSNA2024振り返り
nanachi
0
560
Developer Summit 2025 [14-D-1] Yuki Hattori
yuhattor
19
6.1k
10分で紹介するAmazon Bedrock利用時のセキュリティ対策 / 10-minutes introduction to security measures when using Amazon Bedrock
hideakiaoyagi
0
180
自動テストの世界に、この5年間で起きたこと
autifyhq
10
8.4k
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.3k
Classmethod AI Talks(CATs) #16 司会進行スライド(2025.02.12) / classmethod-ai-talks-aka-cats_moderator-slides_vol16_2025-02-12
shinyaa31
0
100
レビューを増やしつつ 高評価維持するテクニック
tsuzuki817
1
670
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
130
Featured
See All Featured
A better future with KSS
kneath
238
17k
Why Our Code Smells
bkeepers
PRO
336
57k
A Tale of Four Properties
chriscoyier
158
23k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Bash Introduction
62gerente
611
210k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Building Your Own Lightsaber
phodgson
104
6.2k
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