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
2
120
Performance Testing using DTrace
Slides from the presentation given at CocoaHeads Berlin February 2018 meet up.
Renzo Crisóstomo
February 14, 2018
Tweet
Share
More Decks by Renzo Crisóstomo
See All by Renzo Crisóstomo
Continuous Integration in a monorepo
ruenzuo
0
500
Secret History: xcconfig files
ruenzuo
0
65
!Introducing Swift in large code bases
ruenzuo
1
82
Scheduled Releases
ruenzuo
0
33
Other Decks in Programming
See All in Programming
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
SourceGeneratorのススメ
htkym
0
190
Fragmented Architectures
denyspoltorak
0
150
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Oxlint JS plugins
kazupon
1
850
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
260
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
710
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
7k
ThorVG Viewer In VS Code
nors
0
770
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Facilitating Awesome Meetings
lara
57
6.7k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
We Are The Robots
honzajavorek
0
160
Fireside Chat
paigeccino
41
3.8k
The untapped power of vector embeddings
frankvandijk
1
1.6k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
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