lib/simplecov/result_merger.rb
# The path to the .resultset.json cache file
The path to the .resultset.json cache file
The path to the . resultset . json cache file
def merge_results(*file_paths, ignore_timeout: false)
         In big CI setups you might deal with 100s of CI jobs and each one producing Megabytes
         of data. Reading them all in easily produces Gigabytes of memory consumption which
         we want to avoid.
         For similar reasons a SimpleCov::Result is only created in the end as that'd create
         even more data especially when it also reads in all source files.
        initial_memo = valid_results(file_paths.shift, ignore_timeout: ignore_timeout)
        command_names, coverage = file_paths.reduce(initial_memo) do |memo, file_path|
          merge_coverage(memo, valid_results(file_path, ignore_timeout: ignore_timeout))
        end
        create_result(command_names, coverage)
      end
def merge_results ( * file_paths , ignore_timeout : false ) initial_memo = valid_results ( file_paths . shift , ignore_timeout : ignore_timeout ) command_names , coverage = file_paths . reduce ( initial_memo ) do | memo , file_path | merge_coverage ( memo , valid_results ( file_path , ignore_timeout : ignore_timeout ) ) end create_result ( command_names , coverage ) end
The path to the .resultset.json cache file
The path to the . resultset . json cache file
# It is intentional here that files are only read in and parsed one at a time. # # In big CI setups you might deal with 100s of CI jobs and each one producing Megabytes # of data. Reading them all in easily produces Gigabytes of memory consumption which # we want to avoid. # # For similar reasons a SimpleCov::Result is only created in the end as that'd create # even more data especially when it also reads in all source files.
file_paths
ignore_timeout