class Roma::Mkconfig::Calculate
Public Class Methods
connection_num(res)
click to toggle source
# File lib/roma/tools/mkconfig.rb 303 def self.connection_num(res) 304 case res["language"].value 305 when "Ruby" 306 connection = RUBY_CONNECTION 307 when "Java" 308 connection = JAVA_CONNECTION 309 when "PHP" 310 connection = PHP_CONNECTION 311 end 312 313 return connection 314 end
get_bnum(res)
click to toggle source
# File lib/roma/tools/mkconfig.rb 283 def self.get_bnum(res) 284 res["server"] = res["fd_server"] if !res["server"] 285 ans = res["data"].value.to_i * BNUM_COEFFICIENT * REDUNDANCY / res["server"].value.to_i / TC_FILE 286 return ans 287 end
get_fd(res)
click to toggle source
# File lib/roma/tools/mkconfig.rb 298 def self.get_fd(res) 299 res["fd_server"] = res["server"] if !res["fd_server"] 300 res["fd_server"].value.to_i * connection_num(res) + (res["fd_client"].value.to_i- 1) * DEFAULT_ROMA_CONNECTION * 2 301 end
get_xmsize_max(res)
click to toggle source
# File lib/roma/tools/mkconfig.rb 289 def self.get_xmsize_max(res) 290 ans = (res["memory"].value.to_f * GB - OS_MEMORY_SIZE) / res["process"].value.to_i / TC_FILE 291 if ans <= 0 292 ans = res["memory"].value.to_f * GB / 2 / res["process"].value.to_i / TC_FILE 293 end 294 ans = ans.to_i 295 return ans 296 end