怎样在小程序里实现标题的更改
861
2022-10-26
命令行实用程序来配置Swift项目的编译时间
xcprofiler
Command line utility to profile compilation time of Swift project.
This tool is developed in working time for Cookpad.
Installation
gem install xcprofiler
xcprofiler is tested on latest Ruby 2.3/2.4.
Usage
$ xcprofiler [PRODUCT_NAME or ACTIVITY_LOG_PATH] [options]
xcprofiler searches the latest build log on your DerivedData directory.
You can also specify the .xcactivitylog.
$ xcprofiler MyApp$ xcprofiler ~/Library/Developer/Xcode/DerivedData/MyApp-xxxxxxxxxxx/Logs/Build/0761C73D-3B6C-449A-BE89-6D11DAB748FE.xcactivitylog
Sample output is here
+----------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+| File | Line | Method name | Time(ms) |+----------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+| ResultProtocol.swift | 132 | public func ==
Available Options
option | shorthand | description |
---|---|---|
--limit | -l | Limit for display |
--threshold | Threshold of time to display (ms) | |
--show-invalids | Show invalid location results | |
--order | -o | Sort order (default,time,file) |
--derived-data-path | Root path of DerivedData directory | |
--truncate-at | -t | Truncate the method name with specified length |
--no-unique | Show the duplicated results |
Use custom reporters
You can use reporters to output tracking logs.
require 'xcprofiler'profiler = Xcprofiler::Profiler.by_product_name('MyApp')profiler.reporters = [ Xcprofiler::StandardOutputReporter.new(limit: 20, order: :time), Xcprofiler::jsONReporter.new(output_path: 'result.json'), Xcprofiler::BlockReporter.new do |executions| do_something(executions) end,]profiler.report!
You can also implement your own reporters.
See implementation of built-in reporters for detail.
danger-xcprofiler
You can integrate xcprofiler to danger.
https://github.com/giginet/danger-xcprofiler
License
MIT License
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/giginet/xcprofiler.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~