Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Profiling using Signpost

toshi0383
December 12, 2018

Profiling using Signpost

toshi0383

December 12, 2018
Tweet

More Decks by toshi0383

Other Decks in Programming

Transcript

  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. I N T R O D U C E D

    I N W W D C 2 0 1 8
  3. L O G G I N G A P I

    • 2016: *LOG => OSLOG • 2018: SIGNPOST
  4. P O I N T S O F I N

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

    T E R E S T
  6. 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.
  7. 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
  8. 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
  9. 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
  10. D E FA U LT T R A C E

    V I E W Annoying per `name`
  11. C U S T O M I N S T

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

    R U M E N T S • Establish common debug workflow of your team
  13. * . I N S T R P K G

    • xml + CLIPS lang • Instruments Developer Help
  14. 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
  15. 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
  16. 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. .
  17. S U M M A RY • Signpost can visualize

    your App’s Performance • Even better visualization with Custom Instruments
  18. W R I T I N G W R A

    P P E R ⚠ It would cost you array construction and method dispatching. ⚠
  19. 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. .
  20. 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
  21. 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.
  22. 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
  23. 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