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 PhantomJS 2
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
410
Writing Real Time Web Apps (Updated)
wesleyhales
0
56
Writing Real Time Web Apps
wesleyhales
1
160
A Baseline for Web Performance with PhantomJS
wesleyhales
9
1.1k
Other Decks in Technology
See All in Technology
マルチアカウント環境への発見的統制の導入
ch1aki
1
1.3k
PHP"オレ"カンファレンスの告知
ysknsid25
0
330
[2024年3月版] Databricksのシステムアーキテクチャ
databricksjapan
7
1.9k
Databricks におけるデータエンジニアリング
databricksjapan
0
370
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
680
Tebiki株式会社 エンジニア採用資料
tebiki
0
4.1k
「共通基盤」を超えよ! 今、Platform Engineeringに取り組むべき理由
jacopen
25
5.7k
20240416_devopsdaystokyo
kzkmaeda
1
180
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
630
転移学習とドメイン適応の基礎
kmatsui
2
570
Hands-on / Kaname Frusawa / Cloud Compare Users Meetup 2024 at University of Tokyo on April 17
paraworld
2
470
キャラクター制御のためのプロンプト術 for LINE Bot
uezo
0
520
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
27
6.3k
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
Atom: Resistance is Futile
akmur
258
25k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Side Projects
sachag
451
41k
Typedesign – Prime Four
hannesfritz
36
2k
KATA
mclloyd
14
12k
How to train your dragon (web standard)
notwaldorf
71
5.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Large-scale JavaScript Application Architecture
addyosmani
503
110k
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