Closed delannoyk closed 7 years ago
Hi @delannoyk thanks for using xcprofiler 😄
In default, you can't profile build times per files. However, you can implement custom reporter to gather and group logs.
require 'xcprofiler'
profiler = Xcprofiler::Profiler.by_product_name("MyApp")
profiler.reporters = [
Xcprofiler::BlockReporter.new do |executions|
puts executions.group_by { |execution| execution.filename }.map { |file, executions| [file, executions.sum { |e| e.time }] }.to_h
end
]
profiler.report!
How about this solution?
Perfect, thanks!
Hi @giginet
Thanks for this! I've been trying to set it up with your danger plugin and it looks promising!
I was wondering if there was a way to add a threshold for files instead of function bodies and maybe to report the compilation time on the whole file?