class RorVsWild::Plugin::Middleware
def inject_server_timing(data, headers)
def inject_server_timing(data, headers) return if !data || !data[:send_server_timing] || !(sections = data[:sections]) sections = sections.sort_by(&:self_ms).reverse[0,10] headers["Server-Timing"] = format_server_timing_header(sections) if data[:name] && RorVsWild.logger.level <= Logger::Severity::DEBUG RorVsWild.logger.debug(["┤ #{data[:name]} ├".center(80, "─"), format_server_timing_ascii(sections), "─" * 80, nil].join("\n") ) end end