Class: Gruf::Profiler::Interceptor
- Inherits:
-
Interceptors::ServerInterceptor
- Object
- Interceptors::ServerInterceptor
- Gruf::Profiler::Interceptor
- Defined in:
- lib/gruf/profiler/interceptor.rb
Overview
Instance Method Summary collapse
-
#call ⇒ Object
Wraps the entire gruf call and provides memory reports.
Instance Method Details
#call ⇒ Object
Wraps the entire gruf call and provides memory reports
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gruf/profiler/interceptor.rb', line 36 def call result = nil report = MemoryProfiler.report(**) do result = yield end if report profile(report) else log('Memory profiler did not return a report') end result end |