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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Wesley Hales
March 11, 2015
Technology
420
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Automating Web Performance Testing with PhantomJS 2
Given at DevNexus 2015
Wesley Hales
March 11, 2015
More Decks by Wesley Hales
See All by Wesley Hales
High Performance WebSocket
wesleyhales
1
600
Writing Real Time Web Apps (Updated)
wesleyhales
0
73
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
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
190
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
620
システム思考で問題に対処する
yussak
0
200
個人OSSが、机の上から世界に広がるまでの話
shinyasaita
1
370
新しい SLO が良い感じにハマっている話
z63d
5
2.1k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
20260608_Codexの可能性_ノンプログラマー向け_大城追記
doradora09
PRO
0
780
Forza Horizon 6 のテレメトリ機能で 自動運転に使えそうな学習データを集める話
henjin0
0
150
社内の7割が使うデータ基盤を、 データチーム2人で回すためにやったこと
koh_yoshi
4
1.2k
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
230
20分でわかるセキュアAPI
nwiizo
0
180
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
460
Into the Great Unknown - MozCon
thekraken
41
2.7k
Agile that works and the tools we love
rasmusluckow
331
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
490
Mobile First: as difficult as doing things right
swwweet
225
10k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
440
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
540
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