diff --git a/src/BirdsiteLive/Services/CachedStatisticsService.cs b/src/BirdsiteLive/Services/CachedStatisticsService.cs index bc2235d..ef3d4e8 100644 --- a/src/BirdsiteLive/Services/CachedStatisticsService.cs +++ b/src/BirdsiteLive/Services/CachedStatisticsService.cs @@ -13,15 +13,17 @@ namespace BirdsiteLive.Services public class CachedStatisticsService : ICachedStatisticsService { private readonly ITwitterUserDal _twitterUserDal; + private readonly IFollowersDal _followersDal; private static CachedStatistics _cachedStatistics; private readonly InstanceSettings _instanceSettings; #region Ctor - public CachedStatisticsService(ITwitterUserDal twitterUserDal, InstanceSettings instanceSettings) + public CachedStatisticsService(ITwitterUserDal twitterUserDal, IFollowersDal followersDal, InstanceSettings instanceSettings) { _twitterUserDal = twitterUserDal; _instanceSettings = instanceSettings; + _followersDal = followersDal; } #endregion @@ -34,12 +36,15 @@ namespace BirdsiteLive.Services var twitterUserCount = await _twitterUserDal.GetTwitterUsersCountAsync(); var twitterSyncLag = await _twitterUserDal.GetTwitterSyncLag(); var saturation = (int)((double)twitterUserCount / twitterUserMax * 100); + var fediverseUsers = await _followersDal.GetFollowersCountAsync(); _cachedStatistics = new CachedStatistics { RefreshedTime = DateTime.UtcNow, Saturation = saturation, - SyncLag = twitterSyncLag + SyncLag = twitterSyncLag, + TwitterUsers = twitterUserCount, + FediverseUsers = fediverseUsers }; } @@ -52,5 +57,7 @@ namespace BirdsiteLive.Services public DateTime RefreshedTime { get; set; } public TimeSpan SyncLag { get; set; } public int Saturation { get; set; } + public int TwitterUsers { get; set; } + public int FediverseUsers { get; set; } } } \ No newline at end of file diff --git a/src/BirdsiteLive/Views/About/Index.cshtml b/src/BirdsiteLive/Views/About/Index.cshtml index 1f16b09..a86f4f6 100644 --- a/src/BirdsiteLive/Views/About/Index.cshtml +++ b/src/BirdsiteLive/Views/About/Index.cshtml @@ -4,27 +4,12 @@ }
- This node usage is at @Model.Saturation%
+ There are @Model.FediverseUsers fediverse users following @Model.TwitterUsers twitter users
BirdsiteLIVE rely on the Twitter API to provide high quality content. This API has limitations and therefore limits node capacity.
- -
- When the saturation rate goes above 100% the node will no longer update all accounts every 15 minutes and instead will reduce the pooling rate to stay under the API limits, the more saturated a node is the less efficient it will be.
- The software doesn't scale, and it's by design.
-
If you're not on your own node, be reasonable and don't follow too much accounts. And if you can, host your own node. BirdsiteLIVE doesn't require a lot of resources to work and therefore is really cheap to self-host.