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
Performance Testing using DTrace
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Renzo Crisóstomo
February 14, 2018
Programming
130
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Performance Testing using DTrace
Slides from the presentation given at CocoaHeads Berlin February 2018 meet up.
Renzo Crisóstomo
February 14, 2018
More Decks by Renzo Crisóstomo
See All by Renzo Crisóstomo
Continuous Integration in a monorepo
ruenzuo
0
510
Secret History: xcconfig files
ruenzuo
0
70
!Introducing Swift in large code bases
ruenzuo
1
86
Scheduled Releases
ruenzuo
0
37
Other Decks in Programming
See All in Programming
数百円から始めるRuby電子工作
tarosay
0
160
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
710
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
1
140
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
120
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
410
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
230
メールのエイリアス機能を履き違えない
isshinfunada
0
240
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
530
リアルな遅延を測る仕様
kota_yata
1
110
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
200
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
190
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
320
Producing Creativity
orderedlist
PRO
348
40k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
For a Future-Friendly Web
brad_frost
183
10k
Darren the Foodie - Storyboard
khoart
PRO
3
3.6k
Building the Perfect Custom Keyboard
takai
2
840
Designing for Performance
lara
611
70k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
790
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
420
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
PERFORMANCE TESTING USING DTRACE
MOTIVATION
NON-FUNCTIONAL SOFTWARE REQUIREMENTS
BACKSTORY: XING.APP
MEASURING PERFORMANCE WITH XCODE > CACurrentMediaTime / mach_absolute_time() > dispatch_benchmark
> -[XCTestCase measureBlock:]
INSTRUMENTS.APP
None
None
DTRACE
D LANGUAGE provider:module:function:name / predicate / { action statements }
ASOCCIATIVE ARRAYS instr$target:::benchmark_begin { time = timestamp; tag = copyinstr(arg0);
tag_times[tag] = time; } instr$target:::benchmark_end / tag_times[copyinstr(arg0)] != 0 / { tag = copyinstr(arg0); time = (timestamp - tag_times[tag]); printf("%s:%d\n", tag, time); }
PROVIDERS pid1337:libdl:dlopen:return objc7331:NSDate:-dateByAddingTimeInterval?:entry proc:::exec-success
VARS > execname -> process name > pid -> current
pid > timestamp -> nanoseconds > args[0]...[N] -> probe arguments > probemod -> probe module > probefunc -> probe function
None
None
INSTRUMENTS.APP IN THE CLI > instruments > iprofiler > UIAutomation
ORCHESTRATION 1. Prepare the software 2. Run the software 3.
Run DTrace 4. Build performance report
instr
ORCHESTRATION 1. Prepare the software 2. Run the software 3.
Run DTrace 4. Build performance report
gem install instrumentality bundle exec instr profile $INSTRUMENT $TARGET_PROCESS (--interactive)
DEMO
CLOSING > /usr/share/examples/DTTk > Lots of information out there! objc.io,
Oracle, Apple, Facebook > Software instrumentation using the iOS Simulator is far from ideal > Run DTrace on your own systems and get surprised by what's happening!
LINKS > objc.io: DTrace > instr > Jenkins demo: GitHub