feat(stats): show model users metric
This commit is contained in:
parent
f12ac6f234
commit
233d065dd5
3 changed files with 17 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ export type StatsModelData = {
|
|||
tokenChange: number
|
||||
totals: {
|
||||
sessions: number
|
||||
users: number
|
||||
tokens: number
|
||||
cost: number
|
||||
tokensPerSession: number
|
||||
|
|
@ -285,6 +286,7 @@ function buildStatsModelData(
|
|||
tokenChange: percentChange(current.totalTokens, previous.totalTokens),
|
||||
totals: {
|
||||
sessions: current.sessions,
|
||||
users: current.uniqueUsers,
|
||||
tokens: current.totalTokens,
|
||||
cost: round(microcentsToDollars(current.totalCostMicrocents), 2),
|
||||
tokensPerSession: current.sessions > 0 ? Math.round(current.totalTokens / current.sessions) : 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue