<commit_before>require_relative 'env.rb'
require_relative 'logger.rb'
include Logging
include UtilityObjects

Before do | scenario |
	logger.debug "Before scenario..."
	FileUtils::mkdir_p(conf_data['project']['log_device_path'])
	logtimestamp = Time.now.to_i
	log_path = conf_data['project']['log_device_path'] + "/device-#{logtimestamp}.log"
	conf_data['project']['log_path'] = log_path
	conf_data['project']['log_pid'] = fork { `adb logcat *:#{conf_data['project']['log_level']} >> #{log_path}` }
end
After do | scenario |
	logger.debug "After scenario..."
	logger.debug "Saving log to " + conf_data['project']['log_path']
	Process.kill 9, conf_data['project']['log_pid']
logger.debug "Produced device log" 
end<commit_msg>caching log path<commit_after>require_relative 'env.rb'
require_relative 'logger.rb'
include Logging
include UtilityObjects

Before do | scenario |
	logger.debug "Before scenario..."
	FileUtils::mkdir_p(conf_data['project']['log_device_path'])
	logtimestamp = Time.now.to_i
	log_path = conf_data['project']['log_device_path'] + "/device-#{logtimestamp}.log"
	conf_data['project']['log_path'] = log_path
	conf_data['project']['log_pid'] = fork { `adb logcat *:#{conf_data['project']['log_level']} >> #{log_path}` }
end
After do | scenario |
	logger.debug "After scenario..."
	logger.debug "Saving log to " + conf_data['project']['log_path']
	Process.kill 9, conf_data['project']['log_pid']
end
{'fraction_non_alphanumeric': 0.1714890613973183, 'fraction_numerical': 0.0014114326040931546, 'mean_word_length': 7.011299435028248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5903208', 'n_tokens_mistral': 471, 'n_tokens_neox': 468, 'n_words': 93}