Module: DevSuite::Performance::Reporter::Helpers::StatMappings

Defined in:
lib/dev_suite/performance/reporter/helpers/stat_mappings.rb

Constant Summary collapse

PROFILER_STAT_TITLES =
{
  execution_time: {
    real: "Total Time (s)",
    utime: "User CPU Time (s)",
    stime: "System CPU Time (s)",
    total: "User + System CPU Time (s)",
  },
  memory: {
    before: "Memory Before (MB)",
    after: "Memory After (MB)",
    used: "Memory Used (MB)",
    max: "Max Memory Used (MB)",
    min: "Min Memory Used (MB)",
    avg: "Avg Memory Used (MB)",
  },
}.freeze

Class Method Summary collapse

Class Method Details

.title_for(profiler_name, stat_name) ⇒ Object



26
27
28
# File 'lib/dev_suite/performance/reporter/helpers/stat_mappings.rb', line 26

def title_for(profiler_name, stat_name)
  PROFILER_STAT_TITLES.dig(profiler_name, stat_name) || format_default_title(stat_name)
end