class ActionLogic::ActionBenchmark::DefaultFormatter
Attributes
benchmark_log[R]
Public Class Methods
new(benchmark_log: ActionLogic.benchmark_log)
click to toggle source
# File lib/action_logic/action_benchmark/default_formatter.rb, line 4 def initialize(benchmark_log: ActionLogic.benchmark_log) @benchmark_log = benchmark_log end
Public Instance Methods
format(benchmark_result, context_name)
click to toggle source
# File lib/action_logic/action_benchmark/default_formatter.rb, line 8 def format(benchmark_result, context_name) benchmark_log.printf("%s%s %s%f %s%f %s%f %s%f\n", "context:", context_name, "user_time:", benchmark_result.utime, "system_time:", benchmark_result.stime, "total_time:", benchmark_result.total, "real_time:", benchmark_result.real) end