mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature/performance] Store account stats in separate table (#2831)
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
This commit is contained in:
11
internal/cache/size.go
vendored
11
internal/cache/size.go
vendored
@@ -264,6 +264,17 @@ func sizeofAccountSettings() uintptr {
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofAccountStats() uintptr {
|
||||
return uintptr(size.Of(>smodel.AccountStats{
|
||||
AccountID: exampleID,
|
||||
FollowersCount: util.Ptr(100),
|
||||
FollowingCount: util.Ptr(100),
|
||||
StatusesCount: util.Ptr(100),
|
||||
StatusesPinnedCount: util.Ptr(100),
|
||||
LastStatusAt: exampleTime,
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofApplication() uintptr {
|
||||
return uintptr(size.Of(>smodel.Application{
|
||||
ID: exampleID,
|
||||
|
Reference in New Issue
Block a user