mirror of
https://github.com/osukey/osukey.git
synced 2025-06-22 19:57:56 +09:00
Merge pull request #16594 from peppy/realm-subscription-tracking
Add tracking of total realm subscriptions
This commit is contained in:
commit
6e531a574d
@ -83,6 +83,8 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
private static readonly GlobalStatistic<int> realm_instances_created = GlobalStatistics.Get<int>(@"Realm", @"Instances (Created)");
|
private static readonly GlobalStatistic<int> realm_instances_created = GlobalStatistics.Get<int>(@"Realm", @"Instances (Created)");
|
||||||
|
|
||||||
|
private static readonly GlobalStatistic<int> total_subscriptions = GlobalStatistics.Get<int>(@"Realm", @"Subscriptions");
|
||||||
|
|
||||||
private readonly object realmLock = new object();
|
private readonly object realmLock = new object();
|
||||||
|
|
||||||
private Realm? updateRealm;
|
private Realm? updateRealm;
|
||||||
@ -289,6 +291,8 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
var syncContext = SynchronizationContext.Current;
|
var syncContext = SynchronizationContext.Current;
|
||||||
|
|
||||||
|
total_subscriptions.Value++;
|
||||||
|
|
||||||
registerSubscription(action);
|
registerSubscription(action);
|
||||||
|
|
||||||
// This token is returned to the consumer.
|
// This token is returned to the consumer.
|
||||||
@ -309,6 +313,7 @@ namespace osu.Game.Database
|
|||||||
unsubscriptionAction?.Dispose();
|
unsubscriptionAction?.Dispose();
|
||||||
customSubscriptionsResetMap.Remove(action);
|
customSubscriptionsResetMap.Remove(action);
|
||||||
notificationsResetMap.Remove(action);
|
notificationsResetMap.Remove(action);
|
||||||
|
total_subscriptions.Value--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user