MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_llm_cost_record_clone

Function test_llm_cost_record_clone

core/src/telemetry.rs:859–874  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

857
858 #[test]
859 fn test_llm_cost_record_clone() {
860 let record = LlmCostRecord {
861 model: "gpt-4o".to_string(),
862 provider: "openai".to_string(),
863 prompt_tokens: 100,
864 completion_tokens: 50,
865 total_tokens: 150,
866 cost_usd: Some(0.001),
867 timestamp: chrono::Utc::now(),
868 session_id: Some("sess-xyz".to_string()),
869 };
870 let cloned = record.clone();
871 assert_eq!(cloned.model, "gpt-4o");
872 assert_eq!(cloned.provider, "openai");
873 assert_eq!(cloned.prompt_tokens, 100);
874 }
875
876 #[test]
877 fn test_timed_span_new() {

Callers

nothing calls this directly

Calls 2

nowFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected