Slide 1

Slide 1 text

P R O F I L I N G U S I N G S I G N P O S T T O S H I H I R O S U Z U K I

Slide 2

Slide 2 text

T O S H I 0 3 8 3

Slide 3

Slide 3 text

A G E N D A • Signpost • Custom Instruments

Slide 4

Slide 4 text

S I G N P O S T

Slide 5

Slide 5 text

I N T R O D U C E D I N W W D C 2 0 1 8

Slide 6

Slide 6 text

L O G G I N G A P I • 2016: *LOG => OSLOG • 2018: SIGNPOST

Slide 7

Slide 7 text

W W D C 2 0 1 8

Slide 8

Slide 8 text

I N S T R U M E N T S

Slide 9

Slide 9 text

S I G N P O S T

Slide 10

Slide 10 text

I N T E R VA L

Slide 11

Slide 11 text

P O I N T S O F I N T E R E S T

Slide 12

Slide 12 text

P O I N T S O F I N T E R E S T

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

W W D C 2 0 1 8

Slide 15

Slide 15 text

H O W I T ’ S L I G H T W E I G H T 1 / 2 W W D C 2 0 1 8 [Logging Optimization] String construction is delayed until observation.

Slide 16

Slide 16 text

H O W I T ’ S L I G H T W E I G H T 2 / 2 [Observer Optimization] Opt-out immediate mode

Slide 17

Slide 17 text

O N LY D U R I N G O B S E R VAT I O N W W D C 2 0 1 8

Slide 18

Slide 18 text

D I S A B L I N G S C E N A R I O W W D C 2 0 1 8

Slide 19

Slide 19 text

C A S E S T U D Y

Slide 20

Slide 20 text

B E F O R E

Slide 21

Slide 21 text

A F T E R https://github.com/toshi0383/Bitrise-iOS/pull/51

Slide 22

Slide 22 text

D E FA U LT T R A C E V I E W Annoying per `name`

Slide 23

Slide 23 text

C U S T O M I N S T R U M E N T S

Slide 24

Slide 24 text

C U S T O M I N S T R U M E N T S • Establish common debug workflow of your team

Slide 25

Slide 25 text

* . I N S T R P K G • xml + CLIPS lang • Instruments Developer Help

Slide 26

Slide 26 text

C R E AT I N G C U S T O M I N S T R U M E N T S W W D C 2 0 1 8

Slide 27

Slide 27 text

D U P L I C AT E D R E Q U E S T D E T E C T I O N W W D C 2 0 1 8

Slide 28

Slide 28 text

A D VA N C E D S C R I P T I N G P O W E R E D B Y. .

Slide 29

Slide 29 text

B U G ?

Slide 30

Slide 30 text

S U M M A RY • Signpost can visualize your App’s Performance • Even better visualization with Custom Instruments

Slide 31

Slide 31 text

T I P S

Slide 32

Slide 32 text

W W D C 2 0 1 6

Slide 33

Slide 33 text

W R I T I N G W R A P P E R ⚠ It would cost you array construction and method dispatching. ⚠

Slide 34

Slide 34 text

I N T E G R AT E W I T H R X I F Y O U H A P P I LY PAY A R R AY C O N S T R U C T I O N C O S T. .

Slide 35

Slide 35 text

T I P S • Sign with Development Certificate • Use immediate mode only for debug level profiling • No sample codes available from Apple.
 Watch wwdc session to grep source-code
 OR refer to https://github.com/toshi0383/Bitrise-iOS

Slide 36

Slide 36 text

E N A B L E I N P R O D U C T I O N ? • “Always enable to avoid execution timing problems.” • Less than 1ms for 10000 times `os_log(.error)` outputs without observing.

Slide 37

Slide 37 text

I N S TA L L I N G C U S T O M I N S T R U M E N T S • https://qiita.com/toshi0383/items/ ec14467869e25d1b5d13

Slide 38

Slide 38 text

WAT C H V I D E O S F O R M O R E I N F O • Fix Bugs Faster using Activity Tracing: WWDC 2014 • Unified Logging and Activity Tracing: WWDC 2016 • Measuring Performance Using Logging: WWDC 2018

Slide 39

Slide 39 text

D E M O

Slide 40

Slide 40 text

T H A N K S