mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
add count to app state
This commit is contained in:
parent
c7faf46d26
commit
7460326c5d
@ -78,6 +78,7 @@ test('addPayload', t => {
|
||||
|
||||
t.truthy(metrics.clients[instanceId].appName === appName);
|
||||
t.truthy(metrics.clients[instanceId].count === 123);
|
||||
t.truthy(metrics.apps[appName].count === 123);
|
||||
t.truthy(metrics.globalCount === 123);
|
||||
|
||||
t.deepEqual(metrics.getTogglesMetrics().lastHour.toggleX, { yes: 123, no: 0 });
|
||||
|
@ -81,6 +81,9 @@ module.exports = class UnleashClientMetrics {
|
||||
if (this.clients[instanceId]) {
|
||||
this.clients[instanceId].count += count;
|
||||
}
|
||||
if (this.apps[appName]) {
|
||||
this.apps[appName].count += count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user