Mercurial > hg > Members > nobuyasu > jungle_benchmark
view distributed/get_node_list.rb @ 26:cfae346a232e default tip
Fix millsec to sec calc_sd.rb
author | Nobuyasu |
---|---|
date | Fri, 31 Jan 2014 04:58:34 +0900 |
parents | d6d3b7180e6d |
children |
line wrap: on
line source
module GetNodeList def get_node_list(filename) nodesArray = File.open(filename,"r") do |file| file.readlines.select{|line| line =~ /.+jp/ } end nodes = nodesArray.collect{|node| node.chomp()} hostname = `hostname` mynum = 0 if /[0-9]+/ =~ hostname then mynum = $&.to_i end nodes = nodes.rotate(mynum) return nodes end end