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

Profiling using Signpost

E2c86baa99178b8400a2ef49ef861a6c?s=47 toshi0383
December 12, 2018

Profiling using Signpost

E2c86baa99178b8400a2ef49ef861a6c?s=128

toshi0383

December 12, 2018
Tweet

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. T O S H I 0 3 8 3

  3. A G E N D A • Signpost • Custom

    Instruments
  4. S I G N P O S T

  5. I N T R O D U C E D

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

    • 2016: *LOG => OSLOG • 2018: SIGNPOST
  7. W W D C 2 0 1 8

  8. I N S T R U M E N T

    S
  9. S I G N P O S T

  10. I N T E R VA L

  11. P O I N T S O F I N

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

    T E R E S T
  13. None
  14. W W D C 2 0 1 8

  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.
  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
  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
  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
  19. C A S E S T U D Y

  20. B E F O R E

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

  22. D E FA U LT T R A C E

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

    R U M E N T S
  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
  25. * . I N S T R P K G

    • xml + CLIPS lang • Instruments Developer Help
  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
  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
  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. .
  29. B U G ?

  30. S U M M A RY • Signpost can visualize

    your App’s Performance • Even better visualization with Custom Instruments
  31. T I P S

  32. W W D C 2 0 1 6

  33. W R I T I N G W R A

    P P E R ⚠ It would cost you array construction and method dispatching. ⚠
  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. .
  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
  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.
  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
  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
  39. D E M O

  40. T H A N K S