giginet / xcprofiler

:chart_with_upwards_trend: CLI to profile compilation time of Swift project
MIT License
332 stars 13 forks source link

Add zero byte filter to xcactivitylog pattern match. #28

Closed r-plus closed 6 years ago

r-plus commented 6 years ago

xcodebuild sometimes output 0 byte xcactivitylog without debug-time-function-bodies flag like this.

$ ls -l
total 456
drwxr-xr-x  5 taiki  staff     170 12 14 16:06 ./
drwxr-xr-x  5 taiki  staff     170 12 14 16:03 ../
-rw-r--r--  1 taiki  staff       0 12 14 16:06 2764C2EB-D8CB-4845-9F55-62F0639AD8EF.xcactivitylog
-rw-r--r--  1 taiki  staff  226732 12 14 16:06 2DE13137-4428-4892-8EF6-11634807B4A3.xcactivitylog
-rw-r--r--  1 taiki  staff     541 12 14 16:06 Cache.db

This zero byte file created when build Debug configuration with flag and Release configuration without flag at same time. (We are building both configuration at same time in our CI.)

This PR add filtering zero byte xcactivitylog file to find it correctly even if 0 byte file timestamp is newer.

Thanks.