giginet/xcprofiler をいじり倒す

giginet/xcprofiler をいじり倒す

potatotips #36 @ MoneyForward
https://github.com/giginet/xcprofiler

5eee847529e8f5ec2f634a85075fd5aa?s=128

Satoshi Hachiya

January 13, 2017
Tweet

Transcript

  1. giginet/xcprofiler Λ ͍͡Γ౗͢ 2017.01.13 potatotips #36 @jpmarha_jp

  2. try! Swift Tokyo 2017 ͷͪ΄Ͳ $50 off discount code Λ͓஌Βͤ͠·͢

  3. giginet ͞Μ͕࡞ͬͨͷ ʹͳͥʁ

  4. Twitter ʮ͓͒ͬɺ͡Ό͋ԕྀͳ͘ʂʯ

  5. खॱ 1. Xcode Ͱ Other Swift Flags ʹ -Xfrontend -debug-

    time-function-bodies Λઃఆ 2. Xcode ͰϏϧυ 3. xcprofiler Λ࣮ߦ
  6. ίϚϯυ $ xcprofiler Usage: xcprofiler [product name or .xcactivitylog file]

    [options] --[no-]show-invalids Show invalid location results -o [ORDER] Sort order -l, --limit [LIMIT] Limit for display --threshold [THRESHOLD] Threshold of time to display(ms) -h, --help Show this message
  7. Demo

  8. ϛεͬͨͷͰׂѪ ! +--------------------------------+------+-----------------------------------+----------+ | File | Line | Method name

    | Time(ms) | +--------------------------------+------+-----------------------------------+----------+ | Sssssssssssss.swift | 47 | @objc override func viewDidLoad() | 4072.2 | | Rrrrrrrrrrrrrrrrrrrrrrrr.swift | 78 | @objc override func viewDidLoad() | 1064.4 | | Tttttttt.swift | 83 | @objc override func viewDidLoad() | 651.4 | +--------------------------------+------+-----------------------------------+----------+
  9. ࢓૊Έ • DerivedData ͷ .xcactivitylog ϑΝΠϧ • ͨͩͦ͠ͷ··։͍ͯ΋ಡΊͳ͍ • ಡΊΔίϚϯυ͕͚͋ͬͨͲ๨Εͨ

    • ͪͳΈʹ Ruby ੡
  10. ͍͡Γ౗ͯ͠ Contribution

  11. --threshold ௥Ճ • શ݅͡Ό͕͔͔࣌ؒΔ • ͋Δ࣌ؒʢmsʣҎ্ͷσʔλ͕΄͍͠ • ίϯτϦϏϡʔτνϟϯεʂ

  12. None
  13. ·ͱΊ • Ϗϧυ͕஗͍ͷ͸Έͳ͞Μ͝ଘ஌ • ܕਪ࿦͕஗͍ͷ΋άάΕ͹Θ͔Δ • ͜ͷΑ͏ͳπʔϧͰΑΓ໌֬ʹͳΔ • ࣍ͷεςοϓ ->

    ͳͥ஗͍ͷ͔ίϯύΠϥΛݟͯΈΑ͏ʁʁ
  14. Thanks! !