mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
feat(stats): 添加 Provider 性能统计分析
This commit is contained in:
@@ -251,6 +251,16 @@ impl AppState {
|
||||
.map_err(|err| GatewayError::Internal(err.to_string()))
|
||||
}
|
||||
|
||||
pub(crate) async fn summarize_usage_provider_performance(
|
||||
&self,
|
||||
query: &usage::UsageProviderPerformanceQuery,
|
||||
) -> Result<usage::StoredUsageProviderPerformance, GatewayError> {
|
||||
self.data
|
||||
.summarize_usage_provider_performance(query)
|
||||
.await
|
||||
.map_err(|err| GatewayError::Internal(err.to_string()))
|
||||
}
|
||||
|
||||
pub(crate) async fn summarize_usage_cost_savings(
|
||||
&self,
|
||||
query: &usage::UsageCostSavingsSummaryQuery,
|
||||
|
||||
Reference in New Issue
Block a user