refactor(mcp): migrate compatible logging paths to rmcp SDK
CI / UI Checks (pull_request) Successful in 9s
CI / Rust Checks (pull_request) Successful in 27m19s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped
CI / UI Checks (pull_request) Successful in 9s
CI / Rust Checks (pull_request) Successful in 27m19s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped
This commit is contained in:
1 parent
5bf4e3e9bf
commit
4832878468
6 files changed
+516
-28
No files matched your search
@@ -63,9 +63,24 @@ pub(crate) struct CounterSet {
|
||||
sdk_prompts_get_result: AtomicUsize,
|
||||
sdk_completion_dispatch: AtomicUsize,
|
||||
sdk_completion_result: AtomicUsize,
|
||||
sdk_logging_dispatch: AtomicUsize,
|
||||
sdk_logging_level: AtomicUsize,
|
||||
sdk_logging_notification: AtomicUsize,
|
||||
}
|
||||
|
||||
impl CounterSet {
|
||||
pub(crate) fn sdk_logging_dispatch(&self) -> usize {
|
||||
self.sdk_logging_dispatch.load(Ordering::SeqCst)
|
||||
}
|
||||
|
||||
pub(crate) fn sdk_logging_level(&self) -> usize {
|
||||
self.sdk_logging_level.load(Ordering::SeqCst)
|
||||
}
|
||||
|
||||
pub(crate) fn sdk_logging_notification(&self) -> usize {
|
||||
self.sdk_logging_notification.load(Ordering::SeqCst)
|
||||
}
|
||||
|
||||
pub(crate) fn sdk_completion_dispatch(&self) -> usize {
|
||||
self.sdk_completion_dispatch.load(Ordering::SeqCst)
|
||||
}
|
||||
@@ -269,6 +284,24 @@ pub(crate) fn sdk_completion_result_serialized() {
|
||||
#[path = "../rmcp_completion_runtime_tests.rs"]
|
||||
mod rmcp_completion_runtime_tests;
|
||||
|
||||
/// Mark only after constructing the real SDK typed legacy logging request.
|
||||
pub(crate) fn sdk_logging_dispatch_enter() {
|
||||
increment(|counters| &counters.sdk_logging_dispatch);
|
||||
}
|
||||
|
||||
/// Mark only after successfully decoding a real SDK LoggingLevel at either input.
|
||||
pub(crate) fn sdk_logging_level_parsed() {
|
||||
increment(|counters| &counters.sdk_logging_level);
|
||||
}
|
||||
|
||||
/// Mark only after serializing real SDK LoggingMessageNotificationParam params, not an envelope.
|
||||
pub(crate) fn sdk_logging_notification_serialized() {
|
||||
increment(|counters| &counters.sdk_logging_notification);
|
||||
}
|
||||
|
||||
#[path = "../rmcp_logging_runtime_tests.rs"]
|
||||
mod rmcp_logging_runtime_tests;
|
||||
|
||||
fn increment(counter: impl Fn(&CounterSet) -> &AtomicUsize) {
|
||||
let _ = OBSERVER.try_with(|counters| {
|
||||
counter(counters).fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
Reference in new issue
Block a user