Noticed there were missing swiftFunctionTimes and swiftTypeCheckTimes in the outputted json report that were in the original xcactivitylog. After some investigation, it looks like the regex parsing used has some bugs. When running through the matches in the parse(command:occurrences:) methods, there were results that had multiple entries included in them and then were skipped:
It may be caused by the trailing +(.+)\\r in regex queries, which is a bit indeterministic and in some cases may include a \r in it. Had some issues getting a regex query that worked correctly, so moved to just splitting commands on \r and \t. Didn't do a ton of benchmarking, but it didn't seem to cause the script to run noticeably slower. For reference the project I
m running on is fairly large with well over 10k files.
Total transparency, I'm new to xcactivitylog files so I assume this is a bug, but let me know otherwise!
Noticed there were missing
swiftFunctionTimes
andswiftTypeCheckTimes
in the outputted json report that were in the originalxcactivitylog
. After some investigation, it looks like the regex parsing used has some bugs. When running through the matches in theparse(command:occurrences:)
methods, there were results that had multiple entries included in them and then were skipped:It may be caused by the trailing
+(.+)\\r
in regex queries, which is a bit indeterministic and in some cases may include a\r
in it. Had some issues getting a regex query that worked correctly, so moved to just splittingcommands
on\r
and\t
. Didn't do a ton of benchmarking, but it didn't seem to cause the script to run noticeably slower. For reference the project I m running on is fairly large with well over 10k files.Total transparency, I'm new to
xcactivitylog
files so I assume this is a bug, but let me know otherwise!