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
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
490
Secret History: xcconfig files
ruenzuo
0
63
!Introducing Swift in large code bases
ruenzuo
1
80
Scheduled Releases
ruenzuo
0
32
Other Decks in Programming
See All in Programming
iOS開発スターターキットの作り方
akidon0000
0
230
202507_ADKで始めるエージェント開発の基本 〜デモを通じて紹介〜(奥田りさ)The Basics of Agent Development with ADK — A Demo-Focused Introduction
risatube
PRO
6
1.3k
Bedrock AgentCore ObservabilityによるAIエージェントの運用
licux
8
480
Workers を定期実行する方法は一つじゃない
rokuosan
0
130
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
610
Jakarta EE Meets AI
ivargrimstad
0
500
副作用と戦う PHP リファクタリング ─ ドメインイベントでビジネスロジックを解きほぐす
kajitack
3
500
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
580
オホーツクでコミュニティを立ち上げた理由―地方出身プログラマの挑戦 / TechRAMEN 2025 Conference
lemonade_37
1
390
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
100
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
180
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
1.2k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Balancing Empowerment & Direction
lara
1
510
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Rails Girls Zürich Keynote
gr2m
95
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Unsuck your backbone
ammeep
671
58k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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