server-stats.model.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { ActivityType } from '../activitypub'
  2. import { VideoRedundancyStrategyWithManual } from '../redundancy'
  3. type ActivityPubMessagesSuccess = Record<`totalActivityPub${ActivityType}MessagesSuccesses`, number>
  4. type ActivityPubMessagesErrors = Record<`totalActivityPub${ActivityType}MessagesErrors`, number>
  5. export interface ServerStats extends ActivityPubMessagesSuccess, ActivityPubMessagesErrors {
  6. totalUsers: number
  7. totalDailyActiveUsers: number
  8. totalWeeklyActiveUsers: number
  9. totalMonthlyActiveUsers: number
  10. totalLocalVideos: number
  11. totalLocalVideoViews: number
  12. totalLocalVideoComments: number
  13. totalLocalVideoFilesSize: number
  14. totalVideos: number
  15. totalVideoComments: number
  16. totalLocalVideoChannels: number
  17. totalLocalDailyActiveVideoChannels: number
  18. totalLocalWeeklyActiveVideoChannels: number
  19. totalLocalMonthlyActiveVideoChannels: number
  20. totalLocalPlaylists: number
  21. totalInstanceFollowers: number
  22. totalInstanceFollowing: number
  23. videosRedundancy: VideosRedundancyStats[]
  24. totalActivityPubMessagesProcessed: number
  25. totalActivityPubMessagesSuccesses: number
  26. totalActivityPubMessagesErrors: number
  27. activityPubMessagesProcessedPerSecond: number
  28. totalActivityPubMessagesWaiting: number
  29. }
  30. export interface VideosRedundancyStats {
  31. strategy: VideoRedundancyStrategyWithManual
  32. totalSize: number
  33. totalUsed: number
  34. totalVideoFiles: number
  35. totalVideos: number
  36. }