rename lib/{model_context_protocol => mcp}

This commit is contained in:
Topher Bullock 2025-05-29 17:11:40 -04:00
commit 9d2447b351

View file

@ -1,26 +0,0 @@
# frozen_string_literal: true
module ModelContextProtocol
module Instrumentation
def instrument_call(method, &block)
start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
begin
@instrumentation_data = {}
add_instrumentation_data(method:)
result = yield block
result
ensure
end_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
add_instrumentation_data(duration: end_time - start_time)
configuration.instrumentation_callback.call(@instrumentation_data)
end
end
def add_instrumentation_data(**kwargs)
@instrumentation_data.merge!(kwargs)
end
end
end