mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
add count to app state
This commit is contained in:
parent
68ac0c71c9
commit
a34ee105fe
@ -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