MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / reset_stats

Method reset_stats

python/src/llm/client.rs:798–807  ·  view source on GitHub ↗

Reset client statistics

(&self)

Source from the content-addressed store, hash-verified

796
797 /// Reset client statistics
798 fn reset_stats(&self) -> PyResult<()> {
799 get_runtime().block_on(async {
800 let mut stats = self.stats.write().await;
801 stats.total_requests = 0;
802 stats.successful_requests = 0;
803 stats.failed_requests = 0;
804 stats.average_response_time_ms = 0.0;
805 });
806 Ok(())
807 }
808
809 /// Complete with full response object (synchronous)
810 #[instrument(skip(self, py), fields(prompt_len = prompt.len()))]

Callers 3

test_statistics_resetMethod · 0.45

Calls 1

get_runtimeFunction · 0.50

Tested by 3

test_statistics_resetMethod · 0.36