MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_llm_cost_record_with_session

Function test_llm_cost_record_with_session

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

Source from the content-addressed store, hash-verified

791
792 #[test]
793 fn test_llm_cost_record_with_session() {
794 let record = LlmCostRecord {
795 model: "gpt-4o".to_string(),
796 provider: "openai".to_string(),
797 prompt_tokens: 500,
798 completion_tokens: 200,
799 total_tokens: 700,
800 cost_usd: Some(0.003),
801 timestamp: chrono::Utc::now(),
802 session_id: Some("session-abc".to_string()),
803 };
804 assert_eq!(record.session_id, Some("session-abc".to_string()));
805 }
806
807 #[test]
808 fn test_llm_cost_record_without_session() {

Callers

nothing calls this directly

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected