Profiling using Signpost

E2c86baa99178b8400a2ef49ef861a6c?s=47 toshi0383
December 12, 2018

Profiling using Signpost

E2c86baa99178b8400a2ef49ef861a6c?s=128

toshi0383

December 12, 2018
Tweet

Transcript

  1. 1.

    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
  2. 5.

    I N T R O D U C E D

    I N W W D C 2 0 1 8
  3. 6.

    L O G G I N G A P I

    • 2016: *LOG => OSLOG • 2018: SIGNPOST
  4. 11.

    P O I N T S O F I N

    T E R E S T
  5. 12.

    P O I N T S O F I N

    T E R E S T
  6. 13.
  7. 15.

    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.
  8. 16.

    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
  9. 17.

    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
  10. 18.

    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
  11. 22.

    D E FA U LT T R A C E

    V I E W Annoying per `name`
  12. 23.

    C U S T O M I N S T

    R U M E N T S
  13. 24.

    C U S T O M I N S T

    R U M E N T S • Establish common debug workflow of your team
  14. 25.

    * . I N S T R P K G

    • xml + CLIPS lang • Instruments Developer Help
  15. 26.

    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
  16. 27.

    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
  17. 28.

    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. .
  18. 29.
  19. 30.

    S U M M A RY • Signpost can visualize

    your App’s Performance • Even better visualization with Custom Instruments
  20. 31.
  21. 33.

    W R I T I N G W R A

    P P E R ⚠ It would cost you array construction and method dispatching. ⚠
  22. 34.

    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. .
  23. 35.

    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
  24. 36.

    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.
  25. 37.

    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
  26. 38.

    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
  27. 39.