代码拉取完成,页面将自动刷新
#!/usr/bin/env ruby
#
# This is a simplified version of extract-stats + stats/wrapper.
# It could potentially be expanded to replace extract-stats.
require 'tempfile'
LKP_SRC = ENV['LKP_SRC'] || File.dirname(File.dirname(File.realpath($PROGRAM_NAME)))
if ARGV[0]
RESULT_ROOT = File.realpath ARGV[0]
ENV['RESULT_ROOT'] = RESULT_ROOT
else
RESULT_ROOT = ENV['RESULT_ROOT']
end
exit unless Dir.chdir(RESULT_ROOT)
def extract_one(program, result_file)
tmp_yaml = Tempfile.new("lkp-stats.#{program}.")
system "#{LKP_SRC}/stats/#{program}", result_file, in: result_file, out: tmp_yaml.path
system "#{LKP_SRC}/sbin/dump-stat", result_file, in: tmp_yaml.path
tmp_yaml.close
end
def extract_files(result_files)
result_files.each do |result_file|
case result_file
when 'time', /.*\.time$/
extract_one 'time', result_file
end
end
end
extract_files Dir['time', '*.time']
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。