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
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
72
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
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
170
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
310
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
590
APIテストとは?
nagix
0
170
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
17
16k
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
160
AI Adaptable なテストを整える工夫 / Ways to Make Your Tests AI-Adaptable
bitkey
PRO
2
200
Datadog 認定試験の概要と対策
uechishingo
0
220
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
120
Diagnosing performance problems without the guesswork
elenatanasoiu
0
150
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
320
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
290
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
350
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Design in an AI World
tapps
1
220
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Optimizing for Happiness
mojombo
378
71k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
330
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
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