MCPcopy Index your code
hub / github.com/coder/coder / GetChatCostPerChat

Method GetChatCostPerChat

coderd/database/dbmetrics/querymetrics.go:1341–1347  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetChatCostPerChatParams)

Source from the content-addressed store, hash-verified

1339}
1340
1341func (m queryMetricsStore) GetChatCostPerChat(ctx context.Context, arg database.GetChatCostPerChatParams) ([]database.GetChatCostPerChatRow, error) {
1342 start := time.Now()
1343 r0, r1 := m.s.GetChatCostPerChat(ctx, arg)
1344 m.queryLatencies.WithLabelValues("GetChatCostPerChat").Observe(time.Since(start).Seconds())
1345 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetChatCostPerChat").Inc()
1346 return r0, r1
1347}
1348
1349func (m queryMetricsStore) GetChatCostPerModel(ctx context.Context, arg database.GetChatCostPerModelParams) ([]database.GetChatCostPerModelRow, error) {
1350 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetChatCostPerChatMethod · 0.65

Tested by

no test coverage detected