4 Star 18 Fork 184

Fengguang/lkp-tests

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
extract-result-stats 900 Bytes
一键复制 编辑 原始数据 按行查看 历史
Philip Li 提交于 2021-11-29 14:55 +08:00 . rubocop: fix Style/StringConcatenation
#!/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']
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu_fengguang/lkp-tests.git
git@gitee.com:wu_fengguang/lkp-tests.git
wu_fengguang
lkp-tests
lkp-tests
master

搜索帮助