Class: RosettAi::Profiler::NullProfiler

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/profiler.rb

Overview

No-op profiler when RAI_PROFILE is not set. Zero overhead — all methods are empty.

Instance Method Summary collapse

Instance Method Details

#measure(_phase_name) ⇒ Object

Measure execution time of a block (no-op in null profiler).

Parameters:

  • _phase_name (String)

    ignored phase name

Returns:

  • (Object)

    block return value



76
77
78
# File 'lib/rosett_ai/profiler.rb', line 76

def measure(_phase_name)
  yield
end

#reportvoid

This method returns an undefined value.

Return the profiling report (no-op in null profiler).



83
# File 'lib/rosett_ai/profiler.rb', line 83

def report; end