aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/models/src/server/server-stats.model.ts
blob: 5870ee73ddc21e5a7bb49b6ee95194d5a4773408 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { ActivityType } from '../activitypub/index.js'
import { VideoRedundancyStrategyWithManual } from '../redundancy/index.js'

type ActivityPubMessagesSuccess = Record<`totalActivityPub${ActivityType}MessagesSuccesses`, number>
type ActivityPubMessagesErrors = Record<`totalActivityPub${ActivityType}MessagesErrors`, number>

export interface ServerStats extends ActivityPubMessagesSuccess, ActivityPubMessagesErrors {
  totalUsers: number
  totalDailyActiveUsers: number
  totalWeeklyActiveUsers: number
  totalMonthlyActiveUsers: number

  totalLocalVideos: number
  totalLocalVideoViews: number
  totalLocalVideoComments: number
  totalLocalVideoFilesSize: number

  totalVideos: number
  totalVideoComments: number

  totalLocalVideoChannels: number
  totalLocalDailyActiveVideoChannels: number
  totalLocalWeeklyActiveVideoChannels: number
  totalLocalMonthlyActiveVideoChannels: number

  totalLocalPlaylists: number

  totalInstanceFollowers: number
  totalInstanceFollowing: number

  videosRedundancy: VideosRedundancyStats[]

  totalActivityPubMessagesProcessed: number
  totalActivityPubMessagesSuccesses: number
  totalActivityPubMessagesErrors: number

  activityPubMessagesProcessedPerSecond: number
  totalActivityPubMessagesWaiting: number
}

export interface VideosRedundancyStats {
  strategy: VideoRedundancyStrategyWithManual
  totalSize: number
  totalUsed: number
  totalVideoFiles: number
  totalVideos: number
}